Minor, get rid of SAMs in some loadJava tests
This commit is contained in:
@@ -8,6 +8,8 @@ public class RawSuperType {
|
||||
|
||||
public interface Super<T> {
|
||||
void foo(T t);
|
||||
|
||||
void dummy(); // To make it not SAM
|
||||
}
|
||||
|
||||
public class Derived implements Super {
|
||||
@@ -15,6 +17,9 @@ public class RawSuperType {
|
||||
public void foo(Object o) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dummy() {}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,13 +5,12 @@ public open class RawSuperType {
|
||||
|
||||
public open inner class Derived : test.RawSuperType.Super<kotlin.Any?> {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ fun dummy(): kotlin.Unit
|
||||
public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any!): kotlin.Unit
|
||||
}
|
||||
|
||||
public trait Super</*0*/ T> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun </*0*/ T> Super(/*0*/ function: (T!) -> kotlin.Unit): test.RawSuperType.Super<T>
|
||||
}
|
||||
|
||||
+7
-1
@@ -10,9 +10,13 @@ public interface TwoSuperclassesInconsistentGenericTypes {
|
||||
@KotlinSignature("fun foo(): MutableList<String?>")
|
||||
List<String> foo();
|
||||
|
||||
void dummy(); // To make it not SAM
|
||||
|
||||
public interface Other {
|
||||
@KotlinSignature("fun foo(): MutableList<String>?")
|
||||
List<String> foo();
|
||||
|
||||
void dummy(); // To make it not SAM
|
||||
}
|
||||
|
||||
public class Sub implements TwoSuperclassesInconsistentGenericTypes, Other {
|
||||
@@ -20,5 +24,7 @@ public interface TwoSuperclassesInconsistentGenericTypes {
|
||||
public List<String> foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void dummy() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -1,19 +1,17 @@
|
||||
package test
|
||||
|
||||
public /*synthesized*/ fun TwoSuperclassesInconsistentGenericTypes(/*0*/ function: () -> kotlin.(Mutable)List<kotlin.String!>!): test.TwoSuperclassesInconsistentGenericTypes
|
||||
|
||||
public trait TwoSuperclassesInconsistentGenericTypes {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
|
||||
public trait Other {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
}
|
||||
|
||||
public open class Sub : test.TwoSuperclassesInconsistentGenericTypes, test.TwoSuperclassesInconsistentGenericTypes.Other {
|
||||
public constructor Sub()
|
||||
public open override /*2*/ fun dummy(): kotlin.Unit
|
||||
public open override /*2*/ fun foo(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun Other(/*0*/ function: () -> kotlin.(Mutable)List<kotlin.String!>!): test.TwoSuperclassesInconsistentGenericTypes.Other
|
||||
}
|
||||
|
||||
+5
-1
@@ -11,11 +11,15 @@ import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
public interface TwoSuperclassesVarargAndNot {
|
||||
public interface Super1 {
|
||||
void foo(String... s);
|
||||
|
||||
void dummy(); // To make it not SAM
|
||||
}
|
||||
|
||||
public interface Super2 {
|
||||
@KotlinSignature("fun foo(s : Array<out String?>?)")
|
||||
void foo(String[] s);
|
||||
|
||||
void dummy(); // To make it not SAM
|
||||
}
|
||||
|
||||
public interface Sub extends Super1, Super2 {
|
||||
@@ -24,4 +28,4 @@ public interface TwoSuperclassesVarargAndNot {
|
||||
"Incompatible super methods: some have vararg parameter, some have not|")
|
||||
void foo(String[] s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -3,18 +3,17 @@ package test
|
||||
public trait TwoSuperclassesVarargAndNot {
|
||||
|
||||
public trait Sub : test.TwoSuperclassesVarargAndNot.Super1, test.TwoSuperclassesVarargAndNot.Super2 {
|
||||
public abstract override /*2*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*2*/ fun foo(/*0*/ s: kotlin.Array<(out) kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public trait Super1 {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit
|
||||
}
|
||||
|
||||
public trait Super2 {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ s: kotlin.Array<(out) kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun Super1(/*0*/ function: (kotlin.Array<(out) kotlin.String!>!) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super1
|
||||
public final /*synthesized*/ fun Super2(/*0*/ function: (kotlin.Array<(out) kotlin.String!>!) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user