Skip to content

Infix operators printed in error messages use invalid syntax #4566

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
pweisenburger opened this issue May 22, 2018 · 0 comments
Closed

Infix operators printed in error messages use invalid syntax #4566

pweisenburger opened this issue May 22, 2018 · 0 comments
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug stat:fix available

Comments

@pweisenburger
Copy link
Contributor

Infix operators shown in error messages use fully-qualified names, e.g., Int my.full.name.:: Int. On the one hand, you can see the full name (which might be a valuable information). On the other hand, it's not valid syntax and quite hard to read (especially for longer names). Scala prints the type as Int :: Int.

Example:

object test {
  type ::[A, B]
  def a: Int :: Int = ???
  def b: Int = a
}

Message:

4 |    def b: Int = a
  |                 ^
  |                 found:    Int test.:: Int
  |                 required: Int
@smarter smarter added itype:bug area:reporting Error reporting including formatting, implicit suggestions, etc labels May 23, 2018
odersky added a commit that referenced this issue Jan 19, 2019
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 itype:bug stat:fix available
Projects
None yet
Development

No branches or pull requests

3 participants