diff --git a/self_hosted/main.jou b/self_hosted/main.jou index 30621f79..e2618f59 100644 --- a/self_hosted/main.jou +++ b/self_hosted/main.jou @@ -235,7 +235,7 @@ class Compiler: if strcmp(self->files[isrc].ast.path, imp->resolved_path) == 0: src = &self->files[isrc] break - if (src->ast.path == dest->ast.path): + if src == dest: fail(imp->location, "the file itself cannot be imported") assert src != NULL