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

Usability: compiler suggests possible names in NotAMemberError #6711

Merged
merged 1 commit into from
Nov 2, 2018

Commits on Nov 2, 2018

  1. Suggest possible names in NotAMemberError

    Fixes scala/bug#10181
    
    With this change, NotAMemberError checks for possible members under target with edit distance of 2 or 1.
    
    ```scala
    scala> import scala.io.StdIn.{readline, readInt}
                  ^
           error: value readline is not a member of object scala.io.StdIn
           did you mean readLine?
    
    scala> import scala.io.stdin.{readLine => line}
                           ^
           error: object stdin is not a member of package io
           did you mean StdIn?
    
    scala> import scala.sth
                  ^
           error: object sth is not a member of package scala
           did you mean sys or math?
    ```
    eed3si9n authored and lrytz committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    1db387a View commit details
    Browse the repository at this point in the history