diff --git a/src/api/symboltable/symboltable.py b/src/api/symboltable/symboltable.py index adb7b1755..277b450ad 100644 --- a/src/api/symboltable/symboltable.py +++ b/src/api/symboltable/symboltable.py @@ -335,7 +335,7 @@ def access_id( ignore_explicit_flag=False, ): """Access a symbol by its identifier and checks if it exists. - If not, it's supposed to be an implicit declared variable. + If not, it's supposed to be an implicitly declared variable. default_class is the class to use in case of an undeclared-implicit-accessed id """ diff --git a/src/zxbc/zxbparser.py b/src/zxbc/zxbparser.py index 82a26b6ea..fa0951959 100755 --- a/src/zxbc/zxbparser.py +++ b/src/zxbc/zxbparser.py @@ -381,6 +381,9 @@ def make_call(id_: str, lineno: int, args: symbols.ARGLIST): This function will inspect the id_. If it is undeclared then id_ will be taken as a forwarded function. """ + if args is None: + return None + assert isinstance(args, symbols.ARGLIST) entry = SYMBOL_TABLE.access_call(id_, lineno) diff --git a/tests/functional/zx48k/explicit_crash.bas b/tests/functional/zx48k/explicit_crash.bas new file mode 100644 index 000000000..7471c4984 --- /dev/null +++ b/tests/functional/zx48k/explicit_crash.bas @@ -0,0 +1,13 @@ +REM when compiling with --explicit this should +REM raise an error + +#pragma explicit=true + +DIM r(5, 5) As Ubyte +DIM q as Ubyte + +for x = 1 to 5 + for y = 1 to 5 + q = r(y, x) + next +next