Skip to content

Commit

Permalink
Update src/main.c
Browse files Browse the repository at this point in the history
Co-authored-by: Akuli <[email protected]>
  • Loading branch information
littlewhitecloud and Akuli authored Oct 23, 2023
1 parent 8a53ee1 commit 6f11ded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 6f11ded

Please sign in to comment.