Prohibit inheritance of Java members containing FunctionN types

#KT-25855 Fixed
This commit is contained in:
Denis Zharkov
2018-08-29 15:01:51 +03:00
parent 24a905293f
commit 7e9704e50d
6 changed files with 100 additions and 1 deletions
@@ -0,0 +1,16 @@
// FILE: A.java
import kotlin.jvm.functions.FunctionN;
public class A {
public void foo(FunctionN<?> w) { }
}
// FILE: main.kt
class <!UNSUPPORTED(Inheritance of a Java member referencing 'kotlin.jvm.functions.FunctionN': fun foo\(w: FunctionN<*>!\): Unit defined in A)!>B<!> : A()
fun foo() {
<!UNSUPPORTED(Inheritance of a Java member referencing 'kotlin.jvm.functions.FunctionN': fun foo\(w: FunctionN<*>!\): Unit defined in A)!>object<!> : A() {}
}