Skip to content

REPL syntax error on incomplete catch #14313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
som-snytt opened this issue Jan 20, 2022 · 1 comment
Closed

REPL syntax error on incomplete catch #14313

som-snytt opened this issue Jan 20, 2022 · 1 comment

Comments

@som-snytt
Copy link
Contributor

Compiler version

Scala 3.1.2-RC1-bin-SNAPSHOT

Minimized code

scala> def f[A](x: => Any) =
     |   try x
     |   catch {
-- [E040] Syntax Error: -------------------------------------------------------------------------------------------------------------------------
3 |  catch {
  |         ^
  |         '}' expected, but eof found

scala> try 42 catch {
-- [E040] Syntax Error: -------------------------------------------------------------------------------------------------------------------------
1 |try 42 catch {
  |              ^
  |              '}' expected, but eof found

Output

Errored instead of consuming more user input.

Expectation

Open brace is an easy signal that output is incomplete.

@som-snytt
Copy link
Contributor Author

Duplicates #4393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants