when statement doesn't verify syntax #4301

Closed
dom96 opened this Issue Jun 8, 2016 · 3 comments

Projects

None yet

3 participants

@dom96
Member
dom96 commented Jun 8, 2016
when false:
  "blah blah blah blah..."
  vasdar i = 0sasdsa
  i = "string value - must throw an error"

Compiles fine.

@kirbyfan64
Contributor

I don't think this is a bad thing. when is frequently used for "commenting out" code. My guess is that vasdar i = ... is parsed as a macro call with an assignment statement as the argument?

@Araq
Member
Araq commented Jun 8, 2016

The thing that shouldn't parse is 0sasdsa (int literal immediately followed by an identifier). That's a lexer bug.

@dom96
Member
dom96 commented Jun 8, 2016

Indeed. The body of the when needs to be syntactically correct.

@Araq Araq added a commit that closed this issue Jul 12, 2016
@Araq Araq fixes #4301 84c3830
@Araq Araq closed this in 84c3830 Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment