Fix SAM detection algorithm for case of default overrides
#KT-22652 Fixed
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public interface ACheckedFunction0 : ALambda {
|
||||
public abstract fun apply(): kotlin.Int!
|
||||
public open override /*1*/ fun curried(): ALambda!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public open override /*1*/ fun tupled(): ALambda!
|
||||
}
|
||||
|
||||
public interface ALambda {
|
||||
public abstract fun curried(): ALambda!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun tupled(): ALambda!
|
||||
}
|
||||
Reference in New Issue
Block a user