Skip to content

Improve "did you mean" message when meaning to use object singleton type #13320

Closed
@scf37

Description

@scf37

Compiler version

3.0.1

Minimized code

object Foo:
  case object Boo

object Main:
  def main(args: Array[String]) =
    type t = Option[Foo.Boo]

Output

error] -- [E008] Not Found Error: /tmp/1/Main.scala:7:24 ------------------------------
[error] 7 |    type t = Option[Foo.Boo]
[error]   |                    ^^^^^^^
[error]   |           type Boo is not a member of object Foo - did you mean Foo.Boo$?
[error] one error found
[error] one error found
[error] (Compile / compileIncremental) Compilation failed

Expectation

type Boo is not a member of object Foo - did you mean Foo.Boo.type?

Metadata

Metadata

Assignees

Labels

SpreeSuitable for a future Spreearea:reportingError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingitype:enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions