Discriminate calls with implicit dynamic receivers

This commit is contained in:
Andrey Breslav
2014-12-10 15:28:06 +03:00
parent fbb4ed181a
commit d17edacb65
12 changed files with 192 additions and 20 deletions
@@ -0,0 +1,35 @@
// !MARK_DYNAMIC_CALLS
// FILE: p/J.java
package p;
public class J {
public static class C {
private void sam(Sam sam) {}
}
public interface Sam {
void sam();
}
}
// FILE: k.kt
import p.*
class K: J.C() {
fun <!UNSUPPORTED!>dynamic<!>.test() {
<!DEBUG_INFO_DYNAMIC!>sam<!>(null)
<!INVISIBLE_MEMBER!>sam<!>(
<!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>name<!> = null,
<!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>name<!> = null
<!NO_VALUE_FOR_PARAMETER!>)<!>
}
fun test() {
<!INVISIBLE_MEMBER!>sam<!>(null)
}
}
@@ -0,0 +1,12 @@
package
internal final class K : p.J.C {
public constructor K()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
invisible_fake final override /*1*/ /*fake_override*/ fun sam(/*0*/ sam: (() -> kotlin.Unit)!): kotlin.Unit
invisible_fake open override /*1*/ /*fake_override*/ fun sam(/*0*/ sam: p.J.Sam!): kotlin.Unit
internal final fun test(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal final fun dynamic.test(): kotlin.Unit
}