Disabling @KotlinSignature checks in PLATFORM_TYPES mode

This commit is contained in:
Andrey Breslav
2014-09-10 18:21:38 +04:00
parent ea3215b361
commit d25a76e044
29 changed files with 34 additions and 32 deletions
@@ -7,7 +7,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongProjectionKind {
@ExpectLoadError("Projection kind mismatch, actual: out, in alternative signature: ")
//@ExpectLoadError("Projection kind mismatch, actual: out, in alternative signature: ")
@KotlinSignature("fun copy(a : Array<out Number>, b : Array<Number>) : MutableList<Number>")
public List<Number> copy(Number[] from, Number[] to) {
throw new UnsupportedOperationException();
@@ -5,7 +5,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongReturnTypeStructure {
@ExpectLoadError("'kotlin.String?' type in method signature has 0 type arguments, while 'String<Int>' in alternative signature has 1 of them")
//@ExpectLoadError("'kotlin.String?' type in method signature has 0 type arguments, while 'String<Int>' in alternative signature has 1 of them")
@KotlinSignature("fun foo(a : String, b : List<Map.Entry<String?, String>?>) : String<Int>?")
public String foo(String a, List<Map.Entry<String, String>> b) {
throw new UnsupportedOperationException();
@@ -2,5 +2,5 @@ package test
public open class WrongReturnTypeStructure {
public constructor WrongReturnTypeStructure()
public open fun foo(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
public open fun foo(/*0*/ a: kotlin.String!, /*1*/ b: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
}
@@ -6,7 +6,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeParameterBoundStructure1 {
@ExpectLoadError("'java.lang.Runnable?' type in method signature has 0 type arguments, while 'Runnable<Int>' in alternative signature has 1 of them")
//@ExpectLoadError("'java.lang.Runnable?' type in method signature has 0 type arguments, while 'Runnable<Int>' in alternative signature has 1 of them")
@KotlinSignature("fun <A, B : Runnable<Int>> foo(a : A, b : List<B>) where B : List<Cloneable>")
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
}
@@ -2,5 +2,5 @@ package test
public open class WrongTypeParameterBoundStructure1 {
public constructor WrongTypeParameterBoundStructure1()
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
}
@@ -6,7 +6,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeParameterBoundStructure2 {
@ExpectLoadError("'kotlin.List<kotlin.Cloneable>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
//@ExpectLoadError("'kotlin.List<kotlin.Cloneable>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<B>) where B : List")
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
}
@@ -2,5 +2,5 @@ package test
public open class WrongTypeParameterBoundStructure2 {
public constructor WrongTypeParameterBoundStructure2()
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
}
@@ -5,7 +5,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongValueParameterStructure1 {
@ExpectLoadError("'kotlin.String?' type in method signature has 0 type arguments, while 'String<Int?>' in alternative signature has 1 of them")
//@ExpectLoadError("'kotlin.String?' type in method signature has 0 type arguments, while 'String<Int?>' in alternative signature has 1 of them")
@KotlinSignature("fun foo(a : String<Int?>, b : List<Map.Entry<String?, String>?>) : String")
public String foo(String a, List<Map.Entry<String, String>> b) {
throw new UnsupportedOperationException();
@@ -2,5 +2,5 @@ package test
public open class WrongValueParameterStructure1 {
public constructor WrongValueParameterStructure1()
public open fun foo(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
public open fun foo(/*0*/ a: kotlin.String!, /*1*/ b: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
}
@@ -5,7 +5,7 @@ import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongValueParameterStructure2 {
@ExpectLoadError("'kotlin.Map.Entry<kotlin.String, kotlin.String>' type in method signature has 2 type arguments, while 'Map.Entry<String?>' in alternative signature has 1 of them")
//@ExpectLoadError("'kotlin.Map.Entry<kotlin.String, kotlin.String>' type in method signature has 2 type arguments, while 'Map.Entry<String?>' in alternative signature has 1 of them")
@KotlinSignature("fun foo(a : String, b : List<Map.Entry<String?>?>) : String")
public String foo(String a, List<Map.Entry<String, String>> b) {
throw new UnsupportedOperationException();
@@ -2,5 +2,5 @@ package test
public open class WrongValueParameterStructure2 {
public constructor WrongValueParameterStructure2()
public open fun foo(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
public open fun foo(/*0*/ a: kotlin.String!, /*1*/ b: kotlin.(Mutable)List<kotlin.(Mutable)Map.(Mutable)Entry<kotlin.String!, kotlin.String!>!>!): kotlin.String!
}
@@ -15,7 +15,7 @@ public interface ChangeProjectionKind1 {
}
public interface Sub extends Super {
@ExpectLoadError("Projection kind mismatch, actual: in, in alternative signature: ")
//@ExpectLoadError("Projection kind mismatch, actual: in, in alternative signature: ")
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
}
@@ -15,7 +15,7 @@ public interface ChangeProjectionKind2 {
}
public interface Sub extends Super {
@ExpectLoadError("Parameter type changed for method which overrides another: MutableList<in String>, was: MutableList<String>")
//@ExpectLoadError("Parameter type changed for method which overrides another: MutableList<in String>, was: MutableList<String>")
@KotlinSignature("fun foo(p: MutableList<in String>)")
void foo(List<String> p);
}
@@ -15,7 +15,7 @@ public interface MutableToReadOnly {
}
public interface Sub extends Super {
@ExpectLoadError("Parameter type changed for method which overrides another: List<String>, was: MutableList<String>")
//@ExpectLoadError("Parameter type changed for method which overrides another: List<String>, was: MutableList<String>")
@KotlinSignature("fun foo(p: List<String>)")
void foo(List<String> p);
}
@@ -13,7 +13,7 @@ public interface NotNullToNullable {
}
public interface Sub extends Super {
@ExpectLoadError("Auto type 'kotlin.String' is not-null, while type in alternative signature is nullable: 'String?'")
//@ExpectLoadError("Auto type 'kotlin.String' is not-null, while type in alternative signature is nullable: 'String?'")
@KotlinSignature("fun foo(p: String?)")
void foo(String p);
}
@@ -13,7 +13,7 @@ public interface NullableToNotNull {
}
public interface Sub extends Super {
@ExpectLoadError("In superclass type is nullable: [String?], in subclass it is not: String")
//@ExpectLoadError("In superclass type is nullable: [String?], in subclass it is not: String")
void foo(@NotNull String p);
}
}
@@ -14,7 +14,7 @@ public interface NullableToNotNullKotlinSignature {
}
public interface Sub extends Super {
@ExpectLoadError("Parameter type changed for method which overrides another: String, was: String?")
//@ExpectLoadError("Parameter type changed for method which overrides another: String, was: String?")
@KotlinSignature("fun foo(p: String)")
void foo(String p);
}
@@ -15,7 +15,7 @@ public interface ReadOnlyToMutable {
}
public interface Sub extends Super {
@ExpectLoadError("Parameter type changed for method which overrides another: MutableList<String>, was: List<String>")
//@ExpectLoadError("Parameter type changed for method which overrides another: MutableList<String>, was: List<String>")
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
}
@@ -14,7 +14,7 @@ public interface AddNullabilityJavaSubtype {
}
public interface Sub extends Super {
@ExpectLoadError("Auto type 'kotlin.String' is not-null, while type in alternative signature is nullable: 'String?'")
//@ExpectLoadError("Auto type 'kotlin.String' is not-null, while type in alternative signature is nullable: 'String?'")
@KotlinSignature("fun foo(): String?")
String foo();
}
@@ -15,7 +15,7 @@ public interface AddNullabilitySameGenericType1 {
}
public interface Sub extends Super {
@ExpectLoadError("Return type is changed to not subtype for method which overrides another: MutableList<String?>, was: MutableList<String>")
//@ExpectLoadError("Return type is changed to not subtype for method which overrides another: MutableList<String?>, was: MutableList<String>")
@KotlinSignature("fun foo(): MutableList<String?>")
List<String> foo();
}
@@ -15,7 +15,7 @@ public interface AddNullabilitySameGenericType2 {
}
public interface Sub extends Super {
@ExpectLoadError("Auto type 'kotlin.MutableList<kotlin.String>' is not-null, while type in alternative signature is nullable: 'MutableList<String>?'")
//@ExpectLoadError("Auto type 'kotlin.MutableList<kotlin.String>' is not-null, while type in alternative signature is nullable: 'MutableList<String>?'")
@KotlinSignature("fun foo(): MutableList<String>?")
List<String> foo();
}
@@ -15,7 +15,7 @@ public interface AddNullabilitySameJavaType {
}
public interface Sub extends Super {
@ExpectLoadError("Auto type 'kotlin.CharSequence' is not-null, while type in alternative signature is nullable: 'CharSequence?'")
//@ExpectLoadError("Auto type 'kotlin.CharSequence' is not-null, while type in alternative signature is nullable: 'CharSequence?'")
@KotlinSignature("fun foo(): CharSequence?")
CharSequence foo();
}
@@ -16,7 +16,7 @@ public interface CantMakeImmutableInSubclass {
}
public interface Sub extends Super {
@ExpectLoadError("Return type is changed to not subtype for method which overrides another: List<String>, was: MutableList<String>")
//@ExpectLoadError("Return type is changed to not subtype for method which overrides another: List<String>, was: MutableList<String>")
@KotlinSignature("fun foo(): List<String>")
List<String> foo();
}
@@ -23,7 +23,7 @@ public interface TwoSuperclassesConflictingProjectionKinds {
}
public interface Sub extends Super1, Super2 {
@ExpectLoadError("Incompatible projection kinds in type arguments of super methods' return types: [CharSequence, out CharSequence]")
//@ExpectLoadError("Incompatible projection kinds in type arguments of super methods' return types: [CharSequence, out CharSequence]")
public Collection<CharSequence> foo();
}
}
@@ -12,13 +12,10 @@ public interface ArraysInSubtypes {
}
interface Sub<T> extends Super {
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<CharSequence>? replaced with Array<out CharSequence>? in return type")
String[] array();
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<CharSequence>? replaced with Array<out CharSequence>? in return type")
List<? extends String[]> listOfArray();
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<Any>? replaced with Array<out Any>? in return type")
T[] objArray();
}
}
@@ -16,7 +16,7 @@ public interface TwoSuperclassesInconsistentGenericTypes {
}
public class Sub implements TwoSuperclassesInconsistentGenericTypes, Other {
@ExpectLoadError("Incompatible types in superclasses: [String?, String]")
//@ExpectLoadError("Incompatible types in superclasses: [String?, String]")
public List<String> foo() {
throw new UnsupportedOperationException();
}
@@ -19,9 +19,9 @@ public interface TwoSuperclassesVarargAndNot {
}
public interface Sub extends Super1, Super2 {
@ExpectLoadError("Incompatible projection kinds in type arguments of super methods' return types: [String?, out String?]|" +
"Incompatible super methods: some have vararg parameter, some have not|" +
"Incompatible types in superclasses: [Array<String?>, Array<out String?>?]")
@ExpectLoadError(//"Incompatible projection kinds in type arguments of super methods' return types: [String?, out String?]|" +
//"Incompatible types in superclasses: [Array<String?>, Array<out String?>?]|" +
"Incompatible super methods: some have vararg parameter, some have not|")
void foo(String[] s);
}
}