-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing an off by one error in Expr variable evaluation. #435
Conversation
Reversing the order of pattern names and values when evaluating Exprs, and changing how variable lookup is performed to ensure that if a variable is used it always has a value associated with it. Adding tests to check that let bindings work as expected when nested and overloading names in scope.
tests/MessageSpec/Message.hs
Outdated
@@ -37,4 +37,6 @@ programExec = | |||
it "calls a function with a named and an unnamed argument" $ | |||
"module a(b,c){echo(b+c);}a(b=1,1);" --> oneMessage TextOut (SourcePosition 1 15 []) "2.0" | |||
-- it "warns about a missing argument" $ | |||
-- "module a(b){echo(b);}a();" --> oneMessage TextOut (SourcePosition 1 13 []) "1.0" | |||
-- "module a(b){echo(b);}a();" --> oneMessage TextOut (SourcePosition 1 13 []) "1.0"= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did this equal sign get here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably errant typing in vim. Boo-urns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Fix for #431
Reversing the order of pattern names and values when evaluating Exprs, and changing how variable lookup is performed to ensure that if a variable is used it always has a value associated with it.
Adding tests to check that let bindings work as expected when nested and overloading names in scope.