Remove KotlinSignature from tests, spec, delete tests with errors

This commit is contained in:
Alexander Udalov
2015-11-13 18:36:48 +03:00
parent 9cdeac7839
commit d472154ea7
153 changed files with 30 additions and 1876 deletions

View File

@@ -1,11 +1,8 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import java.io.Serializable;
public class AllBoundsInWhen {
@KotlinSignature("fun <T> foo() where T: Serializable")
public <T extends Serializable> void foo() {
throw new UnsupportedOperationException();
}

View File

@@ -1,9 +1,6 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public class ArrayType {
@KotlinSignature("fun foo(): Array<String>")
public String[] foo() {
throw new UnsupportedOperationException();
}

View File

@@ -1,10 +1,6 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithNewTypeParams<T> {
@KotlinSignature("fun ConstructorWithNewTypeParams(first : Any)") // TODO: first : U doesn't work
public <U>ConstructorWithNewTypeParams(U first) {
public <U> ConstructorWithNewTypeParams(U first) {
}
}

View File

@@ -1,10 +1,6 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithParentTypeParams<T> {
@KotlinSignature("fun ConstructorWithParentTypeParams(first: T)")
public ConstructorWithParentTypeParams(T first) {
}
}

View File

@@ -1,10 +1,8 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithSeveralParams {
@KotlinSignature("fun ConstructorWithSeveralParams(integer : Int, intField : Int, collection: ArrayList<String>)")
public ConstructorWithSeveralParams(Integer integer, int intBasic, ArrayList<String> collection) {
}
}

View File

@@ -1,10 +1,6 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithoutParams {
@KotlinSignature("fun ConstructorWithoutParams()")
public ConstructorWithoutParams() {
}
}

View File

@@ -2,10 +2,7 @@ package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class CustomProjectionKind {
@KotlinSignature("fun foo(): MutableList<out Number>")
public List<Number> foo() {
throw new UnsupportedOperationException();
}

View File

@@ -1,13 +1,8 @@
package test;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import kotlin.jvm.functions.*;
public class MethodWithFunctionTypes {
@KotlinSignature("fun foo(f : (String?) -> String) : (() -> String?)?")
public Function0<String> foo(Function1<String, String> f) {
throw new UnsupportedOperationException();
}

View File

@@ -1,11 +1,8 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class MethodWithGenerics {
@KotlinSignature("fun foo(a : String, b : List<Entry<String?, String>?>) : String")
public String foo(String a, List<Map.Entry<String, String>> b) {
throw new UnsupportedOperationException();
}

View File

@@ -1,11 +1,8 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class MethodWithMappedClasses {
@KotlinSignature("fun <T> copy(dest : MutableList<in T>, src : List<T>)")
public <T> void copy(List<? super T> dest, List<T> src) {
throw new UnsupportedOperationException();
}

View File

@@ -1,14 +1,8 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import java.util.BitSet;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
public class MethodWithTypeParameters {
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<B>, c: MutableList<in String?>) where B : List<Cloneable>")
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
}
}

View File

@@ -1,15 +1,6 @@
package test;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.*;
import java.util.BitSet;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
public class MethodWithVararg {
@KotlinSignature("fun foo(vararg s : String)")
public void foo(String... s) {
}
}

View File

@@ -1,17 +1,9 @@
package test;
import java.lang.String;
import java.util.ArrayList;
import jet.runtime.typeinfo.KotlinSignature;
public class PropertyArrayTypes<T> {
@KotlinSignature("var arrayOfArrays : Array<Array<String>>")
public String[][] arrayOfArrays;
@KotlinSignature("var array : Array<String>")
public String[] array;
@KotlinSignature("var genericArray : Array<T>")
public T[] genericArray;
}

View File

@@ -1,20 +1,13 @@
package test;
import java.lang.String;
import java.util.ArrayList;
import jet.runtime.typeinfo.KotlinSignature;
public class PropertyComplexTypes<T> {
@KotlinSignature("var genericType : T")
public T genericType;
@KotlinSignature("var listDefinedGeneric : ArrayList<String>")
public ArrayList<String> listDefinedGeneric;
@KotlinSignature("var listGeneric : ArrayList<T>")
public ArrayList<T> listGeneric;
@KotlinSignature("var listOfGenericList : ArrayList<ArrayList<T>>")
public ArrayList<ArrayList<T>> listOfGenericList;
}

View File

@@ -1,12 +1,7 @@
package test;
import java.lang.String;
import jet.runtime.typeinfo.KotlinSignature;
public class PropertySimpleType {
@KotlinSignature("var fieldOne : String")
public String fieldOne;
@KotlinSignature("var fieldTwo : String?")
public String fieldTwo;
}

View File

@@ -1,9 +1,6 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public final class StarProjection {
@KotlinSignature("fun foo(): MyClass<*>")
public final MyClass<?> foo() {
throw new UnsupportedOperationException();
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class AddingNullability {
@ExpectLoadError("Auto type 'kotlin.Int' is not-null, while type in alternative signature is nullable: 'Int?'")
@KotlinSignature("fun foo() : Int?")
public int foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class AddingNullability {
public constructor AddingNullability()
public open fun foo(): kotlin.Int
}

View File

@@ -1,15 +0,0 @@
package test;
import java.lang.Number;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class ConflictingProjectionKind {
@ExpectLoadError("Projection kind 'in' is conflicting with variance of kotlin.List")
@KotlinSignature("fun foo(list: List<in Number>)")
public void foo(List<Number> list) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class ConflictingProjectionKind {
public constructor ConflictingProjectionKind()
public open fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.Number!>!): kotlin.Unit
}

View File

@@ -1,10 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class ExplicitFieldGettersAndSetters {
@ExpectLoadError("Field annotation for shouldn't have getters and setters")
@KotlinSignature("var foo: String get() { return \"hello\" }")
public String foo;
}

View File

@@ -1,6 +0,0 @@
package test
public open class ExplicitFieldGettersAndSetters {
public constructor ExplicitFieldGettersAndSetters()
public final var foo: kotlin.String!
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class ExtraUpperBound {
@ExpectLoadError("Upper bound number mismatch for A. Expected 1, but found 2")
@KotlinSignature("fun <A : Runnable> foo() : String where A : Cloneable")
public <A extends Runnable> String foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class ExtraUpperBound {
public constructor ExtraUpperBound()
public open fun </*0*/ A : java.lang.Runnable!> foo(): kotlin.String!
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class MissingUpperBound {
@ExpectLoadError("Upper bound number mismatch for A. Expected 2, but found 1")
@KotlinSignature("fun <A : Runnable> foo() : String")
public <A extends Runnable & Cloneable> String foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class MissingUpperBound {
public constructor MissingUpperBound()
public open fun </*0*/ A : java.lang.Runnable!> foo(): kotlin.String! where A : kotlin.Cloneable!
}

View File

@@ -1,10 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class NoFieldTypeRef {
@ExpectLoadError("Field annotation for shouldn't have type reference")
@KotlinSignature("var foo")
public String foo;
}

View File

@@ -1,6 +0,0 @@
package test
public open class NoFieldTypeRef {
public constructor NoFieldTypeRef()
public final var foo: kotlin.String!
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class NotVarargReplacedWithVararg {
@ExpectLoadError("Parameter in method signature is not vararg, but in alternative signature it is vararg")
@KotlinSignature("fun foo(vararg s : String)")
public void foo(String s) {
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class NotVarargReplacedWithVararg {
public constructor NotVarargReplacedWithVararg()
public open fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit
}

View File

@@ -1,14 +0,0 @@
package test;
import java.lang.Number;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class RedundantProjectionKind {
@KotlinSignature("fun foo(list: List<out Number>)")
public void foo(List<Number> list) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class RedundantProjectionKind {
public constructor RedundantProjectionKind()
public open fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.Number!>!): kotlin.Unit
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class ReturnTypeMissing {
@ExpectLoadError("Return type in alternative signature is missing, while in real signature it is 'kotlin.Int'")
@KotlinSignature("fun foo(a : String)")
public int foo(String a) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class ReturnTypeMissing {
public constructor ReturnTypeMissing()
public open fun foo(/*0*/ p0: kotlin.String!): kotlin.Int
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class SyntaxError {
@ExpectLoadError("Alternative signature has 2 syntax errors, first is at 8: Expecting a parameter declaration")
@KotlinSignature("fun foo(,) : Int")
public Integer foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class SyntaxError {
public constructor SyntaxError()
public open fun foo(): kotlin.Int!
}

View File

@@ -1,10 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class SyntaxErrorInFieldAnnotation {
@ExpectLoadError("Alternative signature has syntax error at 10: Type expected")
@KotlinSignature("var foo : ")
public String foo;
}

View File

@@ -1,6 +0,0 @@
package test
public open class SyntaxErrorInFieldAnnotation {
public constructor SyntaxErrorInFieldAnnotation()
public final var foo: kotlin.String!
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class VarargReplacedWithNotVararg {
@ExpectLoadError("Parameter in method signature is vararg, but in alternative signature it is not")
@KotlinSignature("fun foo(s : String)")
public void foo(String... s) {
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class VarargReplacedWithNotVararg {
public constructor VarargReplacedWithNotVararg()
public open fun foo(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit
}

View File

@@ -1,10 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongFieldInitializer {
@ExpectLoadError("Default value is not expected in annotation for field")
@KotlinSignature("var foo : String = \"Test\"")
public String foo;
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongFieldInitializer {
public constructor WrongFieldInitializer()
public final var foo: kotlin.String!
}

View File

@@ -1,14 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongFieldMutability {
@ExpectLoadError("Wrong mutability in annotation for field")
@KotlinSignature("val fooNotFinal : String")
public String fooNotFinal;
@ExpectLoadError("Wrong mutability in annotation for field")
@KotlinSignature("var fooFinal : String")
public final String fooFinal = "Test";
}

View File

@@ -1,7 +0,0 @@
package test
public open class WrongFieldMutability {
public constructor WrongFieldMutability()
public final val fooFinal: kotlin.String! = "Test"
public final var fooNotFinal: kotlin.String!
}

View File

@@ -1,10 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongFieldName {
@ExpectLoadError("Field name mismatch, original: foo, alternative: bar")
@KotlinSignature("var bar: String")
public String foo;
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongFieldName {
public constructor WrongFieldName()
public final var foo: kotlin.String!
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongMethodName {
@ExpectLoadError("Function names mismatch, original: foo, alternative: bar")
@KotlinSignature("fun bar() : String")
public String foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongMethodName {
public constructor WrongMethodName()
public open fun foo(): kotlin.String!
}

View File

@@ -1,14 +1,8 @@
package test;
import java.lang.Number;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongProjectionKind {
//@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();
}

View File

@@ -1,12 +1,8 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.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")
@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();
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeName1 {
@ExpectLoadError("Alternative signature type mismatch, expected: Unit, actual: kotlin.String")
@KotlinSignature("fun foo(a : String) : Unit")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongTypeName1 {
public constructor WrongTypeName1()
public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String!
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeName2 {
@ExpectLoadError("Alternative signature type mismatch, expected: Something.String, actual: kotlin.String")
@KotlinSignature("fun foo(a : Something.String) : String")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongTypeName2 {
public constructor WrongTypeName2()
public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String!
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeName3 {
@ExpectLoadError("Alternative signature type mismatch, expected: List, actual: kotlin.String")
@KotlinSignature("fun foo(a : String) : List")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongTypeName3 {
public constructor WrongTypeName3()
public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String!
}

View File

@@ -2,12 +2,7 @@ package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.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")
@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) {
}
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.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")
@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) {
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongTypeParameterBoundStructure2 {
public constructor WrongTypeParameterBoundStructure2()
public open fun </*0*/ A : kotlin.Any!, /*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!>!
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongTypeParametersCount {
@ExpectLoadError("Method signature has 2 type parameters, but alternative signature has 3")
@KotlinSignature("fun <A, B, C> foo(a : A, b : List<B>)")
public <A, B> void foo(A a, List<? extends B> b) {
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongTypeParametersCount {
public constructor WrongTypeParametersCount()
public open fun </*0*/ A : kotlin.Any!, /*1*/ B : kotlin.Any!> foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit
}

View File

@@ -1,12 +1,8 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.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")
@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();
}

View File

@@ -1,13 +0,0 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.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")
@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();
}
}

View File

@@ -1,6 +0,0 @@
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!
}

View File

@@ -1,12 +0,0 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public class WrongValueParametersCount {
@ExpectLoadError("Method signature has 0 value parameters, but alternative signature has 1")
@KotlinSignature("fun foo(a : Int) : Int")
public Integer foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -1,6 +0,0 @@
package test
public open class WrongValueParametersCount {
public constructor WrongValueParametersCount()
public open fun foo(): kotlin.Int!
}

View File

@@ -1,28 +1,20 @@
package test;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
public interface PropagateTypeArgumentNullable {
public interface Super {
@KotlinSignature("fun outS(p : List<String?>)")
void outS(List<String> p);
@KotlinSignature("fun invOutS(p : MutableList<List<String?>>)")
void invOutS(List<List<String>> p);
@KotlinSignature("fun outOutS(p : List<List<String?>>)")
void outOutS(List<List<String>> p);
@KotlinSignature("fun outR() : List<String?>")
List<String> outR();
@KotlinSignature("fun invR() : MutableList<String?>")
List<String> invR();
@KotlinSignature("fun invOutR() : MutableList<List<String?>>")
List<List<String>> invOutR();
}

View File

@@ -1,22 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface ChangeProjectionKind1 {
public interface Super {
@KotlinSignature("fun foo(p: MutableList<in String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@ExpectLoadError("Projection kind mismatch, actual: in, in alternative signature: ")
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
}
}

View File

@@ -1,22 +0,0 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface ChangeProjectionKind2 {
public interface Super {
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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);
}
}

View File

@@ -1,14 +0,0 @@
package test
public interface ChangeProjectionKind2 {
public interface Sub : test.ChangeProjectionKind2.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
public interface Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
}

View File

@@ -1,12 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface DeeplySubstitutedClassParameter {
public interface Super<T> {
@KotlinSignature("fun foo(t: T)")
void foo(T p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,12 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface DeeplySubstitutedClassParameter2 {
public interface Super<T> {
@KotlinSignature("fun foo(t: T)")
void foo(T p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,20 +0,0 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface InheritMutability {
public interface Super {
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
void foo(List<String> p);
}
}

View File

@@ -1,14 +0,0 @@
package test
public interface InheritMutability {
public interface Sub : test.InheritMutability.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
public interface Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
}

View File

@@ -1,11 +1,8 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNotVarargNotNull {
public interface Super {
@KotlinSignature("fun foo(p: Array<out String>)")
void foo(String[] p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,21 +0,0 @@
//ALLOW_AST_ACCESS
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface InheritProjectionKind {
public interface Super {
@KotlinSignature("fun foo(p: MutableList<in String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
void foo(List<String> p);
}
}

View File

@@ -1,14 +0,0 @@
package test
public interface InheritProjectionKind {
public interface Sub : test.InheritProjectionKind.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
public interface Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
}

View File

@@ -1,20 +0,0 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface InheritReadOnliness {
public interface Super {
@KotlinSignature("fun foo(p: List<String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
void foo(List<String> p);
}
}

View File

@@ -1,14 +0,0 @@
package test
public interface InheritReadOnliness {
public interface Sub : test.InheritReadOnliness.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
public interface Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p0: kotlin.(Mutable)List<kotlin.String!>!): kotlin.Unit
}
}

View File

@@ -1,11 +1,8 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritVarargNotNull {
public interface Super {
@KotlinSignature("fun foo(vararg p: String)")
void foo(String... p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,7 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
// See SubclassFromGenericAndNot, as well
public interface Kt3302 {
@@ -12,7 +11,6 @@ public interface Kt3302 {
}
public interface LinkedHashMap<K, V> {
@KotlinSignature("fun put(key : K, value : V) : V?")
public V put(K key, V value);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,22 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface MutableToReadOnly {
public interface Super {
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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);
}
}

View File

@@ -1,8 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface NotNullToNullable {
@@ -13,8 +11,6 @@ public interface NotNullToNullable {
}
public interface Sub extends Super {
//@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);
}
}

View File

@@ -1,8 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface NullableToNotNull {
@@ -13,7 +11,6 @@ public interface NullableToNotNull {
}
public interface Sub extends Super {
//@ExpectLoadError("In superclass type is nullable: [String?], in subclass it is not: String")
void foo(@NotNull String p);
}
}

View File

@@ -1,21 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface NullableToNotNullKotlinSignature {
public interface Super {
@KotlinSignature("fun foo(p: String?)")
void foo(String p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@ExpectLoadError("Parameter type changed for method which overrides another: String, was: String?")
@KotlinSignature("fun foo(p: String)")
void foo(String p);
}
}

View File

@@ -1,22 +1,17 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface ReadOnlyToMutable {
public interface Super {
@KotlinSignature("fun foo(p: List<String>)")
void foo(List<String> p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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);
}
}

View File

@@ -1,7 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
// Extracted from KT-3302, see Kt3302 test, as well
public interface SubclassFromGenericAndNot {
@@ -13,7 +12,6 @@ public interface SubclassFromGenericAndNot {
}
public interface Generic<T> {
@KotlinSignature("fun foo(key : T)")
public void foo(T key);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,12 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface SubstitutedClassParameter {
public interface Super<T> {
@KotlinSignature("fun foo(t: T)")
void foo(T p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,19 +1,14 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface SubstitutedClassParameters {
public interface Super1<T> {
@KotlinSignature("fun foo(t: T)")
void foo(T p);
void dummy(); // to avoid loading as SAM interface
}
public interface Super2<E> {
@KotlinSignature("fun foo(t: E)")
void foo(E p);
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,8 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface AddNullabilityJavaSubtype {
@@ -14,8 +12,6 @@ public interface AddNullabilityJavaSubtype {
}
public interface Sub extends Super {
//@ExpectLoadError("Auto type 'kotlin.String' is not-null, while type in alternative signature is nullable: 'String?'")
@KotlinSignature("fun foo(): String?")
String foo();
}
}

View File

@@ -1,22 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface AddNullabilitySameGenericType1 {
public interface Super {
@KotlinSignature("fun foo(): MutableList<String>")
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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();
}
}

View File

@@ -1,22 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface AddNullabilitySameGenericType2 {
public interface Super {
@KotlinSignature("fun foo(): MutableList<String>")
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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();
}
}

View File

@@ -1,9 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.lang.CharSequence;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface AddNullabilitySameJavaType {
@@ -15,8 +12,6 @@ public interface AddNullabilitySameJavaType {
}
public interface Sub extends Super {
//@ExpectLoadError("Auto type 'kotlin.CharSequence' is not-null, while type in alternative signature is nullable: 'CharSequence?'")
@KotlinSignature("fun foo(): CharSequence?")
CharSequence foo();
}
}

View File

@@ -1,23 +1,16 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.kotlin.jvm.compiler.annotation.ExpectLoadError;
public interface CantMakeImmutableInSubclass {
public interface Super {
@KotlinSignature("fun foo(): MutableCollection<String>")
Collection<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
//@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();
}
}

View File

@@ -1,14 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.lang.String;
public interface DeeplySubstitutedClassParameter {
public interface Super<T> {
@KotlinSignature("fun foo(): T")
T foo();
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,14 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.lang.String;
public interface DeeplySubstitutedClassParameter2 {
public interface Super<T> {
@KotlinSignature("fun foo(): T")
T foo();
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,15 +1,12 @@
package test;
import java.util.*;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface HalfSubstitutedTypeParameters {
public interface TrickyList<X, E> extends List<E> {}
public interface Super {
@KotlinSignature("fun foo(): MutableList<String?>")
List<String> foo();
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,15 +1,11 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Collection;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullabilityGenericSubclassSimple {
public interface Super {
@KotlinSignature("fun foo(): MutableCollection<String>")
Collection<String> foo();
void dummy(); // to avoid loading as SAM interface

View File

@@ -1,9 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.lang.CharSequence;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullabilityJavaSubtype {

View File

@@ -1,14 +1,10 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullabilitySameGenericType {
public interface Super {
@KotlinSignature("fun foo(): MutableList<String>")
List<String> foo();
void dummy(); // to avoid loading as SAM interface

Some files were not shown because too many files have changed in this diff Show More