-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kotlin] Ignore backticks when comparing imports
This helps preserve their ordering when sorted lexicographically ^KTIJ-19394 Fixed closes #1879 GitOrigin-RevId: ebc5922726a030aff75903fe130a06791166b18c
- Loading branch information
1 parent
89db917
commit ce851ed
Showing
6 changed files
with
47 additions
and
1 deletion.
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
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
5 changes: 5 additions & 0 deletions
5
plugins/kotlin/idea/tests/testData/editor/optimizeImports/common/BacktickSort.dependency.kt
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,5 @@ | ||
package b | ||
|
||
fun `fun`() {} | ||
fun g() {} | ||
fun `val`() {} |
14 changes: 14 additions & 0 deletions
14
plugins/kotlin/idea/tests/testData/editor/optimizeImports/common/BacktickSort.kt
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,14 @@ | ||
package a | ||
|
||
// Should be sorted, ignoring backticks | ||
import b.g | ||
import b.`fun` | ||
import b.`val` | ||
|
||
class Foo( | ||
fun bar() { | ||
g() | ||
`fun`() | ||
`val`() | ||
} | ||
) |
14 changes: 14 additions & 0 deletions
14
plugins/kotlin/idea/tests/testData/editor/optimizeImports/common/BacktickSort.kt.after
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,14 @@ | ||
package a | ||
|
||
// Should be sorted, ignoring backticks | ||
import b.`fun` | ||
import b.g | ||
import b.`val` | ||
|
||
class Foo( | ||
fun bar() { | ||
g() | ||
`fun`() | ||
`val`() | ||
} | ||
) |