Fix SAM detection algorithm for case of default overrides

#KT-22652 Fixed
This commit is contained in:
Denis Zharkov
2018-03-12 12:14:18 +03:00
parent b4fb0e0305
commit a7854bc0ce
5 changed files with 57 additions and 0 deletions
@@ -0,0 +1,22 @@
// FILE: ALambda.java
public interface ALambda {
ALambda curried();
ALambda tupled();
}
// FILE: ACheckedFunction0.java
public interface ACheckedFunction0 extends ALambda {
Integer apply();
default ALambda curried() { return null; }
default ALambda tupled() { return null; }
}
// FILE: main.kt
fun test() {
ACheckedFunction0 { 2 } // error: Interface ACheckedFunction0 does not have constructors
}