From 6f11ded70854a5e7fef6626d9a602365ca818615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD=E4=BA=91?= <71159641+littlewhitecloud@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:04:04 +0800 Subject: [PATCH] Update src/main.c Co-authored-by: Akuli --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 410e9e9c..6540083b 100644 --- a/src/main.c +++ b/src/main.c @@ -369,7 +369,7 @@ static void add_imported_symbols(struct CompileState *compst) for (AstImport *imp = to->ast.imports.ptr; imp < End(to->ast.imports); imp++) { struct FileState *from = find_file(compst, imp->resolved_path); assert(from); - if (from->path == to->path) { + if (from == to) { fail_with_error(imp->location, "the file itself cannot be imported"); }