Closed mlb2251 closed 5 years ago
Globals work now. Added sfunc-globals1.cl to SAST tests.
<3
Globals actually don't work.
x : int = 3
def foo():
x = "hello"
return x
foo()
fails, since it checks the type annotations for x even though its type annotation is in the global scope. To fix this, we are going to have to keep separate lists of locals and globals which don't duplicate each other, or modify the locals list to drop type annotations for all the globals in the local maps.
Fixed. Globals work now.
checked on latest SAST branch.