Skip to content

Commit 25da966

Browse files
authored
Merge pull request #623 from boriel/fix/crash_on_explicit
fix: crash on using explicit
2 parents 9dcd082 + ea35a4e commit 25da966

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

src/api/symboltable/symboltable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def access_id(
335335
ignore_explicit_flag=False,
336336
):
337337
"""Access a symbol by its identifier and checks if it exists.
338-
If not, it's supposed to be an implicit declared variable.
338+
If not, it's supposed to be an implicitly declared variable.
339339
340340
default_class is the class to use in case of an undeclared-implicit-accessed id
341341
"""

src/zxbc/zxbparser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ def make_call(id_: str, lineno: int, args: symbols.ARGLIST):
381381
This function will inspect the id_. If it is undeclared then
382382
id_ will be taken as a forwarded function.
383383
"""
384+
if args is None:
385+
return None
386+
384387
assert isinstance(args, symbols.ARGLIST)
385388

386389
entry = SYMBOL_TABLE.access_call(id_, lineno)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
REM when compiling with --explicit this should
2+
REM raise an error
3+
4+
#pragma explicit=true
5+
6+
DIM r(5, 5) As Ubyte
7+
DIM q as Ubyte
8+
9+
for x = 1 to 5
10+
for y = 1 to 5
11+
q = r(y, x)
12+
next
13+
next

0 commit comments

Comments
 (0)