-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Warn on bad extensions of aliases #22362
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- [E194] Potential Issue Warning: tests/warn/i22233.scala:1:26 -------------------------------------------------------- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably a check file is not needed, as the text is vetted by the original test. what I would do is move tests/pos/ext-override.scala to warns. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the check file 👍 Also I moved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RoccoMathijn they allow warn tests to have zero warnings, which is useful. I think (IMHO) tests about lack of warning should go in warn, while testing "does this compile" remain in pos. A warn test can still have |
||
1 |extension (s: String) def length = 42 // warn | ||
| ^ | ||
| Extension method length will never be selected from type String | ||
| because String already has a member with the same name and compatible parameter types. | ||
| | ||
| longer explanation available when compiling with `-explain` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extension (s: String) def length = 42 // warn |
Uh oh!
There was an error while loading. Please reload this page.