You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In some cases a command could consider an argument either as a variable, if such is defined, or a literal string. If a variable is defined and if is accessed before its definition, an error is raised. The access-before-definition check uses only line numbers. As a result, the following snippet produces an error while it should not.
Paste the Hedy code & level
Level 12:
define turn
if x is pressed
print 'good'
else
print 'bad'
print 'Start'
call turn
x is 1 + 1
print x
print 'End'
The access-before-definition check should take into account that functions use another scope.
The text was updated successfully, but these errors were encountered:
Describe the bug
In some cases a command could consider an argument either as a variable, if such is defined, or a literal string. If a variable is defined and if is accessed before its definition, an error is raised. The access-before-definition check uses only line numbers. As a result, the following snippet produces an error while it should not.
Paste the Hedy code & level
Level 12:
The access-before-definition check should take into account that functions use another scope.
The text was updated successfully, but these errors were encountered: