Skip to content

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

Closed
@smarter

Description

@smarter

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

Metadata

Metadata

Assignees

Labels

area:reportingError reporting including formatting, implicit suggestions, etcitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions