Skip to content

Incorrect underlined position in error message when line contains tabs #2063

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
smarter opened this issue Mar 7, 2017 · 3 comments
Closed
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc exp:novice help wanted itype:bug stat:fix available

Comments

@smarter
Copy link
Member

smarter commented Mar 7, 2017

$ echo "\tclass Foo extends Bar" > tab.scala
$ dotc tab.scala
-- [E006] Unbound Identifier Error: try/tab.scala ------------------------------
1 |     class Foo extends Bar
  |                  ^^^
  |                  not found: type Bar
$ scalac tab.scala
tab.scala:1: error: not found: type Bar
        class Foo extends Bar
                          ^
@smarter smarter added area:reporting Error reporting including formatting, implicit suggestions, etc exp:novice help wanted itype:bug prio:medium labels Mar 7, 2017
@nicolasstucki
Copy link
Contributor

It currently prints the correct indentation using tabs in the indented ^^^

1 |  class Foo extends Bar
  |                    ^^^
  |                    not found: type Bar

@smarter
Copy link
Member Author

smarter commented May 19, 2017

I just tried it and it's not correct here.

@smarter smarter reopened this May 19, 2017
@nicolasstucki
Copy link
Contributor

Oh, Intellij reformatted my tab :(

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 20, 2017
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 21, 2017
smarter added a commit that referenced this issue May 23, 2017
Fix #2063: Print tabs in message padding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc exp:novice help wanted itype:bug stat:fix available
Projects
None yet
Development

No branches or pull requests

2 participants