AndreVanDelft / scala

The SubScript extension to the Scala programming language
http://www.subscript-lang.org/
12 stars 1 forks source link

Compiler almost hangs on invalid if statement #83

Open AndreVanDelft opened 6 years ago

AndreVanDelft commented 6 years ago

I had typed accidentally

  g = if (b) bc; {*gp*} / doCancel

whereas it should have been

  g = if b then bc; {*gp*} / doCancel

The parser hang for minutes on this. Finally it reported:

[error] Error: ParseError(Position(3607,86,79), Position(3607,86,...), <24 traces>)
[error]    g = if (b) bc; {*gp*} / doCancel
[error]                 ^