From 3ba6b6dbb6badb2bc67a354746efcc16d943aefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 27 May 2025 11:24:56 +0200 Subject: [PATCH] bytecmp: import_cmpenv: fix reversed test for lexical_level Commit f36f53a93349aa986576adf573bee12d384f0f60 accidently(?) reversed the test by adding the else clause without switghing != to ==. SYMBOL-MACROLET does not change top-levelness of its children (unlike other bindings), so we should set lexical_level=1 when we encounter /other/ binding than SYMBOL-MACRO. Moreover we add :DECLARE to the mix. The macro LOCALLY does not change top-levelness either. --- src/c/compiler.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/compiler.d b/src/c/compiler.d index 9a37348cf..3e8f0a26f 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -605,7 +605,7 @@ import_cmpenv(cl_env_ptr env, cl_object cmpenv) continue; reg0 = pop(&record); reg1 = pop(&record); - if (ECL_SYMBOLP(reg0) && reg1 != @'si::symbol-macro') { + if (reg0 == @':declare' || reg1 == @'si::symbol-macro') { continue; } else { c_env->lexical_level = 1;