Created quickfix for KT-9805

This commit is contained in:
Valentin Kipyatkov
2015-11-10 20:19:52 +03:00
parent 80a788cf53
commit 4f9866f62f
8 changed files with 128 additions and 4 deletions
+13 -1
View File
@@ -70,4 +70,16 @@ fun typed<T>() {
fun <T : Cloneable> withTypeParameters() where T : Comparable<T> {
}
C() willBeInfix 1
val x = C() willBeInfix 1
class AAA {
val foo: BBB.() -> Unit get() = null!!
}
class BBB
fun test(a: AAA, b: BBB) {
with(b) {
a.foo()
}
}
+14 -2
View File
@@ -61,7 +61,7 @@ class C {
fun bar() = C::foo
fun willBeInfix(i: Int) {}
infix fun willBeInfix(i: Int) {}
}
fun <T> typed() {
@@ -70,4 +70,16 @@ fun <T> typed() {
fun <T> withTypeParameters() where T : Cloneable, T : Comparable<T> {
}
C() willBeInfix 1
val x = C() willBeInfix 1
class AAA {
val foo: BBB.() -> Unit get() = null!!
}
class BBB
fun test(a: AAA, b: BBB) {
with(b) {
(a.foo)()
}
}
@@ -0,0 +1,15 @@
// "Fix extension function value call" "true"
class A {
val foo: B.() -> Unit get() = null!!
}
class B
fun test(a: A, b: B) {
with(b) {
a.<caret>foo()
}
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
@@ -0,0 +1,15 @@
// "Fix extension function value call" "true"
class A {
val foo: B.() -> Unit get() = null!!
}
class B
fun test(a: A, b: B) {
with(b) {
(a.foo)()
}
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()