Skip to content

Error message regression: "member not found" error should be preferred to "not a valid type prefix" #8632

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 30, 2020 · 0 comments
Assignees
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug
Milestone

Comments

@smarter
Copy link
Member

smarter commented Mar 30, 2020

minimized code

object Test {
  Nil.toString.foo(1)
}

Compilation output

This used to print:

value foo is not a member of String

But now (I didn't check at which commit exactly this changed) it prints:

-- [E083] Type Error: wtf.scala:2:2 --------------------------------------------
2 |  Nil.toString.foo(1)
  |  ^^^^^^^^^^^^
  |  String is not a valid type prefix, since it is not an immutable path
@smarter smarter added itype:bug area:reporting Error reporting including formatting, implicit suggestions, etc labels Mar 30, 2020
@smarter smarter added this to the 0.24.0-RC1 milestone Mar 30, 2020
odersky added a commit that referenced this issue Mar 31, 2020
Fix #8632: Reveal "not found" message more often
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
Projects
None yet
Development

No branches or pull requests

2 participants