bytecmp: import_cmpenv: fix reversed test for lexical_level

Commit f36f53a933 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.
This commit is contained in:
Daniel Kochmański 2025-05-27 11:24:56 +02:00
parent 9995ba6188
commit 3ba6b6dbb6

View file

@ -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;