Convert Member to Extension Intention: Drop open/final modifiers, add imports when necessary, transform Java-site calls
#KT-8876 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
package x
|
||||
|
||||
interface A {
|
||||
}
|
||||
|
||||
fun A.foo(n: Int) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package y;
|
||||
|
||||
import x.A;
|
||||
import x.TestKt;
|
||||
|
||||
class J {
|
||||
static void foo(A a) {
|
||||
TestKt.foo(a, 1);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package y
|
||||
|
||||
import x.A
|
||||
import x.foo
|
||||
|
||||
fun bar(a: A) {
|
||||
a.foo(1)
|
||||
}
|
||||
Reference in New Issue
Block a user