fixing assignment-in-condition

This commit is contained in:
Jeremy Ashkenas
2010-01-17 10:40:59 -05:00
parent e72ef1a61a
commit c4d0903e6a
3 changed files with 37 additions and 21 deletions

View File

@@ -0,0 +1,23 @@
# Assign to try/catch.
result: try
nonexistent * missing
catch error
true
result2: try nonexistent * missing catch error then true
print(result is true and result2 is true)
# Assign to conditional.
get_x: => 10
if x: get_x() then 100
print(x is 10)
x: if get_x() then 100
print(x is 100)