Skip to content
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

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

Closed
scf37 opened this issue Aug 17, 2021 · 1 comment · Fixed by #13374
Closed

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

scf37 opened this issue Aug 17, 2021 · 1 comment · Fixed by #13374
Assignees
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc good first issue Perfect for someone who wants to get started contributing itype:enhancement Spree Suitable for a future Spree
Projects
Milestone

Comments

@scf37
Copy link

scf37 commented Aug 17, 2021

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?

@dwijnand dwijnand changed the title Incorrect error message when using object as type Improve "did you mean" message when meaning to use object singleton type Aug 17, 2021
@bishabosha bishabosha added area:reporting Error reporting including formatting, implicit suggestions, etc good first issue Perfect for someone who wants to get started contributing Spree Suitable for a future Spree labels Aug 18, 2021
@bjornregnell
Copy link
Contributor

I have suggested to assign myself to this at the coming Issue Spree Aug 24.

bjornregnell added a commit to bjornregnell/dotty that referenced this issue Aug 24, 2021
co-authored by:
Anatolii Kmetiuk
anatoliykmetyuk@gmail.com
@griggt griggt linked a pull request Aug 24, 2021 that will close this issue
bjornregnell added a commit to bjornregnell/dotty that referenced this issue Sep 14, 2021
co-authored by:
Anatolii Kmetiuk
anatoliykmetyuk@gmail.com
prolativ added a commit that referenced this issue Sep 14, 2021
Fix #13320: add .type to modules in messages
@TheElectronWill TheElectronWill added this to Fixed in Spree Mar 18, 2022
olsdavis pushed a commit to olsdavis/dotty that referenced this issue Apr 4, 2022
co-authored by:
Anatolii Kmetiuk
anatoliykmetyuk@gmail.com
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
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 good first issue Perfect for someone who wants to get started contributing itype:enhancement Spree Suitable for a future Spree
Projects
Spree
Fixed
Development

Successfully merging a pull request may close this issue.

5 participants