Use descriptors for building SAM constructors
It helps to get rid of semantics duplicating and fixes known bugs - SOE in OnlyAbstractMethodFinder.find - type enhancement for SAM constructors #KT-11287 Fixed #KT-11322 Fixed EA-77989 Fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// FILE: A.java
|
||||
|
||||
public interface A extends A {
|
||||
int getFoo();
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
|
||||
public class B {
|
||||
interface B1 extends B2 {
|
||||
int getFoo();
|
||||
}
|
||||
interface B2 extends B3 {
|
||||
int getFoo();
|
||||
}
|
||||
interface B3 extends B2 {
|
||||
int getFoo();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun foo() {
|
||||
object : A { override fun getFoo() = 1 }
|
||||
object : B.B1 { override fun getFoo() = 1 }
|
||||
object : B.B2 { override fun getFoo() = 1 }
|
||||
object : B.B3 { override fun getFoo() = 1 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user