Minor. Add load-java test checking that SamAdapterOverridabilityCondition is on
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
package test;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function0;
|
||||||
|
|
||||||
|
public final class StaticOverrides {
|
||||||
|
public static class A {
|
||||||
|
static public void foo(Function0<Unit> x) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class B extends A {
|
||||||
|
// SAM adapter should not override A.foo
|
||||||
|
static public void foo(Runnable x) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public final class StaticOverrides {
|
||||||
|
public constructor StaticOverrides()
|
||||||
|
|
||||||
|
public open class A {
|
||||||
|
public constructor A()
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public open fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class B : test.StaticOverrides.A {
|
||||||
|
public constructor B()
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit!)!): kotlin.Unit
|
||||||
|
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)!): kotlin.Unit
|
||||||
|
public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1398,6 +1398,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
|||||||
doTestCompiledJava(fileName);
|
doTestCompiledJava(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("StaticOverrides.java")
|
||||||
|
public void testStaticOverrides() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java");
|
||||||
|
doTestCompiledJava(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("SubstitutedSamInterface.java")
|
@TestMetadata("SubstitutedSamInterface.java")
|
||||||
public void testSubstitutedSamInterface() throws Exception {
|
public void testSubstitutedSamInterface() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java");
|
||||||
|
|||||||
Reference in New Issue
Block a user