Test data split between compiledJava tests and compiledKotlin tests

Basically, this commit splits test data from the from java-txt-kt to two pairs java-txt and kt-txt.
This commit leads to some duplication in test data.
This is temporary: in the platform types branch the test data for LoadJava tests will be changed dramatically, so duplication will go away
This commit is contained in:
Andrey Breslav
2014-08-15 17:07:35 +04:00
parent 1533c0e9f3
commit 1933e30905
711 changed files with 6824 additions and 4231 deletions
@@ -0,0 +1,12 @@
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();
}
}
@@ -0,0 +1,6 @@
package test
public open class AllBoundsInWhen {
public constructor AllBoundsInWhen()
public open fun </*0*/ T : java.io.Serializable> foo(): kotlin.Unit
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public class ArrayType {
@KotlinSignature("fun foo(): Array<String>")
public String[] foo() {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,6 @@
package test
public open class ArrayType {
public constructor ArrayType()
public open fun foo(): kotlin.Array<kotlin.String>
}
@@ -0,0 +1,10 @@
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) {
}
}
@@ -0,0 +1,5 @@
package test
public open class ConstructorWithNewTypeParams</*0*/ T> {
public constructor ConstructorWithNewTypeParams</*0*/ T>(/*0*/ first: kotlin.Any)
}
@@ -0,0 +1,10 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithParentTypeParams<T> {
@KotlinSignature("fun ConstructorWithParentTypeParams(first: T)")
public ConstructorWithParentTypeParams(T first) {
}
}
@@ -0,0 +1,5 @@
package test
public open class ConstructorWithParentTypeParams</*0*/ T> {
public constructor ConstructorWithParentTypeParams</*0*/ T>(/*0*/ first: T)
}
@@ -0,0 +1,10 @@
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) {
}
}
@@ -0,0 +1,5 @@
package test
public open class ConstructorWithSeveralParams {
public constructor ConstructorWithSeveralParams(/*0*/ integer: kotlin.Int, /*1*/ intField: kotlin.Int, /*2*/ collection: java.util.ArrayList<kotlin.String>)
}
@@ -0,0 +1,10 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class ConstructorWithoutParams {
@KotlinSignature("fun ConstructorWithoutParams()")
public ConstructorWithoutParams() {
}
}
@@ -0,0 +1,5 @@
package test
public open class ConstructorWithoutParams {
public constructor ConstructorWithoutParams()
}
@@ -0,0 +1,12 @@
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();
}
}
@@ -0,0 +1,6 @@
package test
public open class CustomProjectionKind {
public constructor CustomProjectionKind()
public open fun foo(): kotlin.MutableList<out kotlin.Number>
}
@@ -0,0 +1,14 @@
package test;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import kotlin.*;
public class MethodWithFunctionTypes {
@KotlinSignature("fun foo(f : (String?) -> String) : (String.() -> String?)?")
public ExtensionFunction0<String, String> foo(Function1<String, String> f) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,6 @@
package test
public open class MethodWithFunctionTypes {
public constructor MethodWithFunctionTypes()
public open fun foo(/*0*/ f: (kotlin.String?) -> kotlin.String): (kotlin.String.() -> kotlin.String?)?
}
@@ -0,0 +1,12 @@
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();
}
}
@@ -0,0 +1,6 @@
package test
public open class MethodWithGenerics {
public constructor MethodWithGenerics()
public open fun foo(/*0*/ a: kotlin.String, /*1*/ b: kotlin.List<kotlin.Map.Entry<kotlin.String?, kotlin.String>?>): kotlin.String
}
@@ -0,0 +1,12 @@
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();
}
}
@@ -0,0 +1,6 @@
package test
public open class MethodWithMappedClasses {
public constructor MethodWithMappedClasses()
public open fun </*0*/ T> copy(/*0*/ dest: kotlin.MutableList<in T>, /*1*/ src: kotlin.List<T>): kotlin.Unit
}
@@ -0,0 +1,14 @@
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) {
}
}
@@ -0,0 +1,6 @@
package test
public open class MethodWithTypeParameters {
public constructor MethodWithTypeParameters()
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable> foo(/*0*/ a: A, /*1*/ b: kotlin.List<B>, /*2*/ c: kotlin.MutableList<in kotlin.String?>): kotlin.Unit where B : kotlin.List<kotlin.Cloneable>
}
@@ -0,0 +1,15 @@
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) {
}
}
@@ -0,0 +1,6 @@
package test
public open class MethodWithVararg {
public constructor MethodWithVararg()
public open fun foo(/*0*/ vararg s: kotlin.String /*kotlin.Array<kotlin.String>*/): kotlin.Unit
}
@@ -0,0 +1,17 @@
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;
}
@@ -0,0 +1,8 @@
package test
public open class PropertyArrayTypes</*0*/ T> {
public constructor PropertyArrayTypes</*0*/ T>()
public final var array: kotlin.Array<kotlin.String>
public final var arrayOfArrays: kotlin.Array<kotlin.Array<kotlin.String>>
public final var genericArray: kotlin.Array<T>
}
@@ -0,0 +1,20 @@
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;
}
@@ -0,0 +1,9 @@
package test
public open class PropertyComplexTypes</*0*/ T> {
public constructor PropertyComplexTypes</*0*/ T>()
public final var genericType: T
public final var listDefinedGeneric: java.util.ArrayList<kotlin.String>
public final var listGeneric: java.util.ArrayList<T>
public final var listOfGenericList: java.util.ArrayList<java.util.ArrayList<T>>
}
@@ -0,0 +1,12 @@
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;
}
@@ -0,0 +1,7 @@
package test
public open class PropertySimpleType {
public constructor PropertySimpleType()
public final var fieldOne: kotlin.String
public final var fieldTwo: kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
public final class StarProjection {
@KotlinSignature("fun foo(): MyClass<*>")
public final MyClass<?> foo() {
throw new UnsupportedOperationException();
}
public interface MyClass<T extends CharSequence> {
}
}
@@ -0,0 +1,9 @@
package test
public final class StarProjection {
public constructor StarProjection()
public final fun foo(): test.StarProjection.MyClass<out kotlin.CharSequence?>
public trait MyClass</*0*/ T : kotlin.CharSequence?> {
}
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class AddingNullability {
public constructor AddingNullability()
public open fun foo(): kotlin.Int
}
@@ -0,0 +1,15 @@
package test;
import java.lang.Number;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class ConflictingProjectionKind {
public constructor ConflictingProjectionKind()
public open fun foo(/*0*/ p0: kotlin.List<kotlin.Number>?): kotlin.Unit
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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;
}
@@ -0,0 +1,6 @@
package test
public open class ExplicitFieldGettersAndSetters {
public constructor ExplicitFieldGettersAndSetters()
public final var foo: kotlin.String?
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class ExtraUpperBound {
public constructor ExtraUpperBound()
public open fun </*0*/ A : java.lang.Runnable?> foo(): kotlin.String?
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class MissingUpperBound {
public constructor MissingUpperBound()
public open fun </*0*/ A : java.lang.Runnable?> foo(): kotlin.String? where A : kotlin.Cloneable?
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class NoFieldTypeRef {
@ExpectLoadError("Field annotation for shouldn't have type reference")
@KotlinSignature("var foo")
public String foo;
}
@@ -0,0 +1,6 @@
package test
public open class NoFieldTypeRef {
public constructor NoFieldTypeRef()
public final var foo: kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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) {
}
}
@@ -0,0 +1,6 @@
package test
public open class NotVarargReplacedWithVararg {
public constructor NotVarargReplacedWithVararg()
public open fun foo(/*0*/ p0: kotlin.String?): kotlin.Unit
}
@@ -0,0 +1,14 @@
package test;
import java.lang.Number;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class RedundantProjectionKind {
@KotlinSignature("fun foo(list: List<out Number>)")
public void foo(List<Number> list) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,6 @@
package test
public open class RedundantProjectionKind {
public constructor RedundantProjectionKind()
public open fun foo(/*0*/ list: kotlin.List<kotlin.Number>): kotlin.Unit
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class ReturnTypeMissing {
public constructor ReturnTypeMissing()
public open fun foo(/*0*/ p0: kotlin.String?): kotlin.Int
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class SyntaxError {
public constructor SyntaxError()
public open fun foo(): kotlin.Int?
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class SyntaxErrorInFieldAnnotation {
@ExpectLoadError("Alternative signature has syntax error at 10: Type expected")
@KotlinSignature("var foo : ")
public String foo;
}
@@ -0,0 +1,6 @@
package test
public open class SyntaxErrorInFieldAnnotation {
public constructor SyntaxErrorInFieldAnnotation()
public final var foo: kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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) {
}
}
@@ -0,0 +1,6 @@
package test
public open class VarargReplacedWithNotVararg {
public constructor VarargReplacedWithNotVararg()
public open fun foo(/*0*/ vararg p0: kotlin.String? /*kotlin.Array<kotlin.String?>*/): kotlin.Unit
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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;
}
@@ -0,0 +1,6 @@
package test
public open class WrongFieldInitializer {
public constructor WrongFieldInitializer()
public final var foo: kotlin.String?
}
@@ -0,0 +1,14 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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";
}
@@ -0,0 +1,7 @@
package test
public open class WrongFieldMutability {
public constructor WrongFieldMutability()
public final val fooFinal: kotlin.String? = "Test"
public final var fooNotFinal: kotlin.String?
}
@@ -0,0 +1,10 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
public class WrongFieldName {
@ExpectLoadError("Field name mismatch, original: foo, alternative: bar")
@KotlinSignature("var bar: String")
public String foo;
}
@@ -0,0 +1,6 @@
package test
public open class WrongFieldName {
public constructor WrongFieldName()
public final var foo: kotlin.String?
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongMethodName {
public constructor WrongMethodName()
public open fun foo(): kotlin.String?
}
@@ -0,0 +1,15 @@
package test;
import java.lang.Number;
import java.util.*;
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: ")
@KotlinSignature("fun copy(a : Array<out Number>, b : Array<Number>) : MutableList<Number>")
public List<Number> copy(Number[] from, Number[] to) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongProjectionKind {
public constructor WrongProjectionKind()
public open fun copy(/*0*/ p0: kotlin.Array<out kotlin.Number>?, /*1*/ p1: kotlin.Array<out kotlin.Number>?): kotlin.MutableList<kotlin.Number>?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
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")
@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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongReturnTypeStructure {
public constructor WrongReturnTypeStructure()
public open fun foo(/*0*/ p0: kotlin.String?, /*1*/ p1: kotlin.List<kotlin.Map.Entry<kotlin.String, kotlin.String>>?): kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongTypeName1 {
public constructor WrongTypeName1()
public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongTypeName2 {
public constructor WrongTypeName2()
public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongTypeName3 {
public constructor WrongTypeName3()
public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
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")
@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) {
}
}
@@ -0,0 +1,6 @@
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.List<B>?): kotlin.Unit where B : kotlin.List<kotlin.Cloneable>?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
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")
@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) {
}
}
@@ -0,0 +1,6 @@
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.List<B>?): kotlin.Unit where B : kotlin.List<kotlin.Cloneable>?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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) {
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongTypeParametersCount {
public constructor WrongTypeParametersCount()
public open fun </*0*/ A, /*1*/ B> foo(/*0*/ p0: A?, /*1*/ p1: kotlin.List<B>?): kotlin.Unit
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
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")
@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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongValueParameterStructure1 {
public constructor WrongValueParameterStructure1()
public open fun foo(/*0*/ p0: kotlin.String?, /*1*/ p1: kotlin.List<kotlin.Map.Entry<kotlin.String, kotlin.String>>?): kotlin.String?
}
@@ -0,0 +1,13 @@
package test;
import java.util.*;
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")
@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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongValueParameterStructure2 {
public constructor WrongValueParameterStructure2()
public open fun foo(/*0*/ p0: kotlin.String?, /*1*/ p1: kotlin.List<kotlin.Map.Entry<kotlin.String, kotlin.String>>?): kotlin.String?
}
@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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();
}
}
@@ -0,0 +1,6 @@
package test
public open class WrongValueParametersCount {
public constructor WrongValueParametersCount()
public open fun foo(): kotlin.Int?
}
@@ -0,0 +1,42 @@
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();
}
public interface Sub extends Super {
void outS(List<String> p);
void invOutS(List<List<String>> p);
void outOutS(List<List<String>> p);
List<String> outR();
List<String> invR();
List<List<String>> invOutR();
}
}
@@ -0,0 +1,22 @@
package test
public trait PropagateTypeArgumentNullable {
public trait Sub : test.PropagateTypeArgumentNullable.Super {
public abstract override /*1*/ fun invOutR(): kotlin.MutableList<kotlin.List<kotlin.String?>>
public abstract override /*1*/ fun invOutS(/*0*/ p: kotlin.MutableList<kotlin.List<kotlin.String?>>): kotlin.Unit
public abstract override /*1*/ fun invR(): kotlin.MutableList<kotlin.String?>
public abstract override /*1*/ fun outOutS(/*0*/ p: kotlin.List<kotlin.List<kotlin.String?>>): kotlin.Unit
public abstract override /*1*/ fun outR(): kotlin.List<kotlin.String?>
public abstract override /*1*/ fun outS(/*0*/ p: kotlin.List<kotlin.String?>): kotlin.Unit
}
public trait Super {
public abstract fun invOutR(): kotlin.MutableList<kotlin.List<kotlin.String?>>
public abstract fun invOutS(/*0*/ p: kotlin.MutableList<kotlin.List<kotlin.String?>>): kotlin.Unit
public abstract fun invR(): kotlin.MutableList<kotlin.String?>
public abstract fun outOutS(/*0*/ p: kotlin.List<kotlin.List<kotlin.String?>>): kotlin.Unit
public abstract fun outR(): kotlin.List<kotlin.String?>
public abstract fun outS(/*0*/ p: kotlin.List<kotlin.String?>): kotlin.Unit
}
}
@@ -0,0 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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);
}
}
@@ -0,0 +1,14 @@
package test
public trait ChangeProjectionKind1 {
public trait Sub : test.ChangeProjectionKind1.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p: kotlin.MutableList<in kotlin.String>): kotlin.Unit
}
public trait Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p: kotlin.MutableList<in kotlin.String>): kotlin.Unit
}
}
@@ -0,0 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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);
}
}
@@ -0,0 +1,14 @@
package test
public trait ChangeProjectionKind2 {
public trait Sub : test.ChangeProjectionKind2.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p: kotlin.MutableList<kotlin.String>): kotlin.Unit
}
public trait Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p: kotlin.MutableList<kotlin.String>): kotlin.Unit
}
}
@@ -0,0 +1,22 @@
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
}
public interface Middle<E> extends Super<E> {
void foo(E p);
}
public interface Sub extends Middle<String> {
void foo(String p);
}
}
@@ -0,0 +1,19 @@
package test
public trait DeeplySubstitutedClassParameter {
public trait Middle</*0*/ E> : test.DeeplySubstitutedClassParameter.Super<E> {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ t: E): kotlin.Unit
}
public trait Sub : test.DeeplySubstitutedClassParameter.Middle<kotlin.String> {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String): kotlin.Unit
}
public trait Super</*0*/ T> {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ t: T): kotlin.Unit
}
}
@@ -0,0 +1,21 @@
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
}
public interface Middle<E> extends Super<E> {
}
public interface Sub extends Middle<String> {
void foo(String p);
}
}
@@ -0,0 +1,19 @@
package test
public trait DeeplySubstitutedClassParameter2 {
public trait Middle</*0*/ E> : test.DeeplySubstitutedClassParameter2.Super<E> {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ t: E): kotlin.Unit
}
public trait Sub : test.DeeplySubstitutedClassParameter2.Middle<kotlin.String> {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String): kotlin.Unit
}
public trait Super</*0*/ T> {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ t: T): kotlin.Unit
}
}
@@ -0,0 +1,20 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.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);
}
}
@@ -0,0 +1,14 @@
package test
public trait InheritMutability {
public trait Sub : test.InheritMutability.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p: kotlin.MutableList<kotlin.String>): kotlin.Unit
}
public trait Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p: kotlin.MutableList<kotlin.String>): kotlin.Unit
}
}
@@ -0,0 +1,14 @@
package test;
public interface InheritNotVararg {
public interface Super {
void foo(String[] p);
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
void foo(String... p);
}
}
@@ -0,0 +1,14 @@
package test
public trait InheritNotVararg {
public trait Sub : test.InheritNotVararg.Super {
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.Array<out kotlin.String>?): kotlin.Unit
}
public trait Super {
public abstract fun dummy(): kotlin.Unit
public abstract fun foo(/*0*/ p0: kotlin.Array<out kotlin.String>?): kotlin.Unit
}
}

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