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
The issue is that literal values are treated differently than names, which could be a variable or another method call.
For instance in the code
up = 2, self add up
Would be ambiguous between calling add on self with no arguments, then calling up on the result, and calling add on self with a parameter up. There is no way to fix this without making the parentheses required, or making the grammar context sensitive (i.e. checking to see if each message is a variable in the current context before deciding how to treat it.
As @rurban says, this could be special cased (just for the to method on Number), but this would only work on literals.
n = 3, m = 5, n to m (i): i string print.
could not be special cased in this way, as we currently can't decide if n is a number.
It would also prevent the use of to being used in a different manner for another object.
Things work fine when using a variable as the lower bound, but Potion seems to segfault when using one as the upper bound. Example:
Am I missing something?
The text was updated successfully, but these errors were encountered: