-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unused import: do not report for 'invoke' function import that is use…
…d from same file #KT-24281 Fixed
- Loading branch information
1 parent
8aa1205
commit 8c4fdd1
Showing
5 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 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,18 @@ | ||
// "Optimize imports" "false" | ||
// WITH_RUNTIME | ||
// ACTION: Introduce import alias | ||
package ppp | ||
|
||
import ppp.invoke<caret> | ||
|
||
object Bar | ||
object Foo { | ||
val bar = Bar | ||
} | ||
|
||
fun Foo.bar() = 1 | ||
operator fun Bar.invoke() = 2 | ||
|
||
fun main() { | ||
println(Foo.bar()) | ||
} |
This file contains 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,17 @@ | ||
// "Optimize imports" "true" | ||
// WITH_RUNTIME | ||
package ppp | ||
|
||
import ppp.invoke<caret> | ||
|
||
object Bar | ||
object Foo { | ||
// val bar = Bar | ||
} | ||
|
||
fun Foo.bar() = 1 | ||
operator fun Bar.invoke() = 2 | ||
|
||
fun main() { | ||
println(Foo.bar()) | ||
} |
This file contains 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,15 @@ | ||
// "Optimize imports" "true" | ||
// WITH_RUNTIME | ||
package ppp | ||
|
||
object Bar | ||
object Foo { | ||
// val bar = Bar | ||
} | ||
|
||
fun Foo.bar() = 1 | ||
operator fun Bar.invoke() = 2 | ||
|
||
fun main() { | ||
println(Foo.bar()) | ||
} |
10 changes: 10 additions & 0 deletions
10
idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.