From 508ba7ec737a201fa8c131ea2e236e4b934544ee 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:33 +0800 Subject: [PATCH] Update self_hosted/main.jou Co-authored-by: Akuli --- self_hosted/main.jou | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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