-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix "did you mean" hinting #7895
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:6:15 ------------------------------------------------------ | ||
6 | val x1 = Int.maxvalue // error | ||
| ^^^^^^^^^^^^ | ||
| value maxvalue is not a member of object Int - did you mean Int.MaxValue? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:7:15 ------------------------------------------------------ | ||
7 | val x2 = Int.MxValue // error | ||
| ^^^^^^^^^^^ | ||
| value MxValue is not a member of object Int - did you mean Int.MaxValue? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:8:15 ------------------------------------------------------ | ||
8 | val x3 = Int.MaxxValue // error | ||
| ^^^^^^^^^^^^^ | ||
| value MaxxValue is not a member of object Int - did you mean Int.MaxValue? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:10:13 ----------------------------------------------------- | ||
10 | val d1 = O.abcd // error | ||
| ^^^^^^ | ||
| value abcd is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:11:13 ----------------------------------------------------- | ||
11 | val d2 = O.abc // error | ||
| ^^^^^ | ||
| value abc is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:12:13 ----------------------------------------------------- | ||
12 | val d3 = O.ab // error, no hint since distance = 3 > 2 = length | ||
| ^^^^ | ||
| value ab is not a member of object O | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:13:13 ----------------------------------------------------- | ||
13 | val s1 = O.Abcde // error | ||
| ^^^^^^^ | ||
| value Abcde is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:14:13 ----------------------------------------------------- | ||
14 | val s3 = O.AbCde // error | ||
| ^^^^^^^ | ||
| value AbCde is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:15:13 ----------------------------------------------------- | ||
15 | val s3 = O.AbCdE // error | ||
| ^^^^^^^ | ||
| value AbCdE is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:16:13 ----------------------------------------------------- | ||
16 | val s3 = O.AbCDE // error, no hint | ||
| ^^^^^^^ | ||
| value AbCDE is not a member of object O | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:17:13 ----------------------------------------------------- | ||
17 | val a1 = O.abcde0 // error | ||
| ^^^^^^^^ | ||
| value abcde0 is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:18:13 ----------------------------------------------------- | ||
18 | val a2 = O.abcde00 // error | ||
| ^^^^^^^^^ | ||
| value abcde00 is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:19:13 ----------------------------------------------------- | ||
19 | val a3 = O.abcde000 // error | ||
| ^^^^^^^^^^ | ||
| value abcde000 is not a member of object O - did you mean O.abcde? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:20:13 ----------------------------------------------------- | ||
20 | val a4 = O.abcde0000 // error, no hint | ||
| ^^^^^^^^^^^ | ||
| value abcde0000 is not a member of object O | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:22:13 ----------------------------------------------------- | ||
22 | val y1 = O.x // error, no hint | ||
| ^^^ | ||
| value x is not a member of object O | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:23:13 ----------------------------------------------------- | ||
23 | val y2 = O.xY // error | ||
| ^^^^ | ||
| value xY is not a member of object O - did you mean O.xy? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:24:13 ----------------------------------------------------- | ||
24 | val y3 = O.xyz // error | ||
| ^^^^^ | ||
| value xyz is not a member of object O - did you mean O.xy? | ||
-- [E008] Member Not Found Error: tests/neg/name-hints.scala:25:13 ----------------------------------------------------- | ||
25 | val y2 = O.XY // error, no hint | ||
| ^^^^ | ||
| value XY is not a member of object O |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
object O with | ||
val abcde: Int = 0 | ||
val xy: Int = 1 | ||
|
||
object Test with | ||
val x1 = Int.maxvalue // error | ||
val x2 = Int.MxValue // error | ||
val x3 = Int.MaxxValue // error | ||
|
||
val d1 = O.abcd // error | ||
val d2 = O.abc // error | ||
val d3 = O.ab // error, no hint since distance = 3 > 2 = length | ||
val s1 = O.Abcde // error | ||
val s3 = O.AbCde // error | ||
val s3 = O.AbCdE // error | ||
val s3 = O.AbCDE // error, no hint | ||
val a1 = O.abcde0 // error | ||
val a2 = O.abcde00 // error | ||
val a3 = O.abcde000 // error | ||
val a4 = O.abcde0000 // error, no hint | ||
|
||
val y1 = O.x // error, no hint | ||
val y2 = O.xY // error | ||
val y3 = O.xyz // error | ||
val y2 = O.XY // error, no hint | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.