-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #17667 account for import order #17951
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 all 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 |
---|---|---|
|
@@ -68,7 +68,7 @@ object InlineChecks: | |
inline def getSet = Set(1) | ||
|
||
object InlinedBar: | ||
import collection.mutable.Set // ok | ||
import collection.mutable.Set // error | ||
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. @szymon-rd 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. No, you are correct. Some of these tests lay out the expected false negatives. If this is not a false negative, then great. |
||
import collection.mutable.Map // error | ||
val a = InlineFoo.getSet | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// scalac: -Wunused:imports | ||
|
||
object MyImplicits: | ||
extension (a: Int) def print: Unit = println(s"Hello, I am $a") | ||
|
||
import MyImplicits.print // ok | ||
object Foo: | ||
def printInt(a: Int): Unit = a.print | ||
import MyImplicits._ // error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make it a case class instead? This tuple got very long and hard to understand.