effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Unexpected end of input on opening brace after newline

Open phischu opened this issue 1 year ago • 1 comments

The following program fails to parse with Unexpected end of input. On a previous version it was accepted.

def benchmark { f: Int => Int } = f(1)

def main() = benchmark
  { n => n }

phischu avatar Jun 26 '24 12:06 phischu

There was the conscious decision to not allow this for parens:

https://github.com/effekt-lang/effekt/blob/9e651118559e5980e7182a10e47abdbd9bf1b973/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala#L863-L866

we might still allow this for braces, if we care.

b-studios avatar Jun 26 '24 13:06 b-studios

This looks like a wontfix then, feel free to reopen if we really want this.

jiribenes avatar May 18 '25 13:05 jiribenes