Move: Nested classes support
#KT-9027 In Progress
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
inline fun <T, R> with(receiver: T, block: T.() -> R): R = receiver.block()
|
||||
|
||||
class A() {
|
||||
fun X.bar() {}
|
||||
}
|
||||
|
||||
class X {
|
||||
fun Int.foo() {}
|
||||
|
||||
inner class Y {
|
||||
fun test() {
|
||||
1.foo()
|
||||
with(1) { foo() }
|
||||
with(A()) { bar() }
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
inline fun <T, R> with(receiver: T, block: T.() -> R): R = receiver.block()
|
||||
|
||||
class A() {
|
||||
fun X.bar() {}
|
||||
}
|
||||
|
||||
class X {
|
||||
fun Int.foo() {}
|
||||
|
||||
inner class <caret>Y {
|
||||
fun test() {
|
||||
1.foo()
|
||||
with(1) { foo() }
|
||||
with(A()) { bar() }
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Call with two implicit receivers won't be processed: bar()
|
||||
Call with two implicit receivers won't be processed: foo()
|
||||
Qualified call won't be processed: 1.foo()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"mainFile": "test.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"outerInstanceParameter": "a",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user