mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
KTIJ-30581 [kotlin] Adjust refactorings and J2K testdata to the new Import Optimizer implementation
There are some improvements and some degradations. Most notably, there is a "kotlin.concurrent.Volatile" annotation replacement in J2K, which happens because K2 references have problems with type aliases (see KTIJ-25346 as one of the tracking issues). GitOrigin-RevId: 8bf9a6a65d34fc335897e8209d09dedf350abc6c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
85183ddedc
commit
2b6f294f4a
@@ -1,18 +0,0 @@
|
||||
package b
|
||||
|
||||
import b.Factory.Companion.invoke
|
||||
import java.util.function.IntPredicate
|
||||
|
||||
interface Factory {
|
||||
operator fun invoke(i: Int): IntPredicate
|
||||
|
||||
companion object {
|
||||
inline operator fun invoke(crossinline f: (Int) -> IntPredicate) = object : Factory {
|
||||
override fun invoke(i: Int) = f(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(): Factory = Factory { k ->
|
||||
IntPredicate { n -> n % k == 0 }
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import B.*
|
||||
|
||||
fun bar() {
|
||||
val t: B.A = B.A()
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package a
|
||||
|
||||
import b.B
|
||||
import b.B.*
|
||||
|
||||
fun bar() {
|
||||
val t: B.A = B.A()
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package p
|
||||
|
||||
// comment
|
||||
// comment 2
|
||||
|
||||
internal class A {
|
||||
@Volatile
|
||||
var field: Int = 0
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// API_VERSION: 1.9
|
||||
// COMPILER_ARGUMENTS: -opt-in=kotlin.ExperimentalStdlibApi
|
||||
internal class A {
|
||||
@Volatile
|
||||
var field1: Int = 0
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
// ERROR: This annotation is not applicable to target 'member property with backing field'.
|
||||
import kotlin.concurrent.Volatile
|
||||
|
||||
internal class A {
|
||||
@Deprecated("")
|
||||
@Volatile
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import TestInnerClasses.Base
|
||||
|
||||
class TestInnerClasses {
|
||||
open inner class Base
|
||||
inner class Derived : Base()
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// ERROR: This annotation is not applicable to target 'member property with backing field'.
|
||||
import kotlin.concurrent.Volatile
|
||||
|
||||
|
||||
internal class A {
|
||||
@Deprecated("")
|
||||
|
||||
Reference in New Issue
Block a user