adjusted the type checker to properly process strings

This commit is contained in:
igor
2026-03-09 14:24:31 +01:00
parent d65b05f1d2
commit 19cae8c56d

View File

@@ -4877,7 +4877,8 @@ class Assembler:
print(f"[v3] type-check: '{defn.name}' -> extern '{word.name}' skipped (unknown depth)") print(f"[v3] type-check: '{defn.name}' -> extern '{word.name}' skipped (unknown depth)")
continue continue
if opc == _OP_LIT: if opc == _OP_LIT:
depth += 1 # String literals push 2 values (addr + len), others push 1.
depth += 2 if isinstance(node.data, str) else 1
elif opc == _OP_WP: elif opc == _OP_WP:
depth += 1 depth += 1
elif opc == _OP_LIST_LIT: elif opc == _OP_LIST_LIT: