Open timotheecour opened 3 years ago
This is arguably a parser bug. Will be interesting to see what it breaks... :-/
what about these, they're accepted but IMO parser should complain:
nim --eval:'echo 10.. 12'
10 .. 12
nim --eval:'echo 10- 12'
-2
(if needed with warning for a deprecation period)
These should produce warnings but are valid, afaict.
while working on https://github.com/timotheecour/Nim/pull/418 I noticed that this is currently legal:
proposal
make it illegal (indentation error).
This stays legal:
rationale
error prone, since, in more complex cases, it wouldn't be clear that the RHS belongs to an infix expression, eg:
note
https://github.com/nim-lang/Nim/issues/8258 is related but different related but different issue: https://github.com/nim-lang/Nim/pull/17352