Skip to content

REPL Trying to highlight erroneous position #9885

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 Sep 26, 2020 · 3 comments
Closed

REPL Trying to highlight erroneous position #9885

som-snytt opened this issue Sep 26, 2020 · 3 comments

Comments

@som-snytt
Copy link
Contributor

Minimized code

Starting dotty REPL...
scala> def (

Output

Starting dotty REPL...
scala> def Trying to highlight erroneous position [4..21]. Input size: 5
(

Expectation

Good position for bad code.

Noticed at https://gitter.im/lampepfl/dotty?at=5f6eab495b75b305ddc6bde3

@izhangzhihao
Copy link
Contributor

Confirm fixed in 3.0-M3:

scala> def (
1 |def (
  |    ^
  |    an identifier expected, but '(' found
1 |def (
  |     ^
  |     '=' expected, but eof found

@som-snytt
Copy link
Contributor Author

Fixed in M1 by 3bb85e5

in updated extension syntax
#9845

@som-snytt
Copy link
Contributor Author

Misc regression tests were added in #10007 but the bad pos issue needs a pos-checking test.

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

4 participants