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
@@ -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();
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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
}
}
@@ -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
@@ -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
@@ -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);
}
}
@@ -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
}
}
@@ -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
@@ -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);
}
}
@@ -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
}
}
@@ -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);
}
}
@@ -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
}
}
@@ -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
@@ -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
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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
@@ -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
@@ -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
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,9 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.lang.CharSequence;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullabilityJavaSubtype {
@@ -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
@@ -1,9 +1,6 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.lang.CharSequence;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullabilitySameJavaType {
@@ -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 InheritProjectionKind {
public interface Super {
@KotlinSignature("fun foo(): MutableCollection<out Number>")
Collection<Number> foo();
void dummy(); // to avoid loading as SAM interface
@@ -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 InheritReadOnlinessOfArgument {
public interface Super {
@KotlinSignature("fun foo(): List<List<String>>>")
List<List<String>> foo();
void dummy(); // to avoid loading as SAM interface
@@ -1,15 +1,10 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Collection;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritReadOnlinessSameClass {
public interface Super {
@KotlinSignature("fun foo(): List<String>")
List<String> foo();
void dummy(); // to avoid loading as SAM interface
@@ -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 InheritReadOnlinessSubclass {
public interface Super {
@KotlinSignature("fun foo(): Collection<String>")
Collection<String> foo();
void dummy(); // to avoid loading as SAM interface
@@ -1,11 +1,7 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Collection;
import jet.runtime.typeinfo.KotlinSignature;
public interface SameProjectionKind {
public interface Super {
@@ -1,8 +1,5 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface SubclassFromGenericAndNot {
public interface NonGeneric {
@@ -12,7 +9,6 @@ public interface SubclassFromGenericAndNot {
}
public interface Generic<T> {
@KotlinSignature("fun foo(): T")
public T foo();
void dummy(); // to avoid loading as SAM interface
@@ -1,14 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.lang.String;
public interface SubstitutedClassParameter {
public interface Super<T> {
@KotlinSignature("fun foo(): T")
T foo();
void dummy(); // to avoid loading as SAM interface
@@ -1,21 +1,14 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.lang.String;
public interface SubstitutedClassParameters {
public interface Super1<T> {
@KotlinSignature("fun foo(): T")
T foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2<E> {
@KotlinSignature("fun foo(): E")
E foo();
void dummy(); // to avoid loading as SAM interface
@@ -1,29 +1,22 @@
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 TwoSuperclassesConflictingProjectionKinds {
public interface Super1 {
@KotlinSignature("fun foo(): MutableCollection<CharSequence>")
public Collection<CharSequence> foo();
Collection<CharSequence> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@KotlinSignature("fun foo(): MutableCollection<out CharSequence>")
public Collection<CharSequence> foo();
Collection<CharSequence> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
//@ExpectLoadError("Incompatible projection kinds in type arguments of super methods' return types: [CharSequence, out CharSequence]")
public Collection<CharSequence> foo();
Collection<CharSequence> foo();
}
}
@@ -1,26 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TwoSuperclassesInvariantAndCovariantInferMutability {
public interface Super1 {
@KotlinSignature("fun foo(): List<List<String>>")
public List<List<String>> foo();
List<List<String>> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@KotlinSignature("fun foo(): MutableList<MutableList<String>>")
public List<List<String>> foo();
List<List<String>> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public List<List<String>> foo();
List<List<String>> foo();
}
}
@@ -1,26 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TwoSuperclassesInvariantAndCovariantInferNullability {
public interface Super1 {
@KotlinSignature("fun foo(): List<String?>")
public List<String> foo();
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@KotlinSignature("fun foo(): MutableList<String>")
public List<String> foo();
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public List<String> foo();
List<String> foo();
}
}
@@ -1,26 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TwoSuperclassesMutableAndNot {
public interface Super1 {
@KotlinSignature("fun foo(): MutableCollection<String>")
public Collection<String> foo();
Collection<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@KotlinSignature("fun foo(): List<String>")
public List<String> foo();
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public List<String> foo();
List<String> foo();
}
}
@@ -1,24 +1,23 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface TwoSuperclassesReturnJavaSubtype {
public interface Super1 {
public CharSequence foo();
CharSequence foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@NotNull
public CharSequence foo();
CharSequence foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public String foo();
String foo();
}
}
@@ -1,24 +1,23 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface TwoSuperclassesReturnSameJavaType {
public interface Super1 {
public CharSequence foo();
CharSequence foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@NotNull
public CharSequence foo();
CharSequence foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public CharSequence foo();
CharSequence foo();
}
}
@@ -1,27 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
import kotlin.*;
public interface TwoSuperclassesSupplementNotNull {
public interface Super1 {
@KotlinSignature("fun foo(): List<String?>")
public List<String> foo();
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Super2 {
@KotlinSignature("fun foo(): List<String>?")
public List<String> foo();
List<String> foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super1, Super2 {
public List<String> foo();
List<String> foo();
}
}
@@ -1,19 +1,18 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TypeParamOfClass {
public interface Super<T> {
@NotNull
public T foo();
T foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub<T> extends Super<T> {
public T foo();
T foo();
}
}
@@ -1,19 +1,18 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TypeParamOfClassSubstituted {
public interface Super<T> {
@NotNull
public T foo();
T foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super<String> {
public String foo();
String foo();
}
}
@@ -1,19 +1,18 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.util.*;
public interface TypeParamOfFun {
public interface Super {
@NotNull
public <T> T foo();
<T> T foo();
void dummy(); // to avoid loading as SAM interface
}
public interface Sub extends Super {
public <E> E foo();
<E> E foo();
}
}
@@ -1,19 +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.*;
import java.util.List;
public interface InheritMutability {
public interface Super {
@KotlinSignature("fun <A: MutableList<String>> foo(a: A)")
<A extends List<String>> void foo(A a);
}
public interface Sub extends Super {
<B extends List<String>> void foo(B b);
}
}
@@ -1,12 +0,0 @@
package test
public interface InheritMutability {
public interface Sub : test.InheritMutability.Super {
public abstract override /*1*/ fun </*0*/ B : kotlin.(Mutable)List<kotlin.String!>!> foo(/*0*/ p0: B!): kotlin.Unit
}
public interface Super {
public abstract fun </*0*/ A : kotlin.(Mutable)List<kotlin.String!>!> foo(/*0*/ p0: A!): kotlin.Unit
}
}
@@ -1,12 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface InheritNullability {
public interface Super {
@KotlinSignature("fun <A: CharSequence> foo(a: A)")
<A extends CharSequence> void foo(A a);
}
@@ -1,18 +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 <A: List<String>> foo(a: A)")
<A extends List<String>> void foo(A a);
}
public interface Sub extends Super {
<B extends List<String>> void foo(B b);
}
}
@@ -1,12 +0,0 @@
package test
public interface InheritReadOnliness {
public interface Sub : test.InheritReadOnliness.Super {
public abstract override /*1*/ fun </*0*/ B : kotlin.(Mutable)List<kotlin.String!>!> foo(/*0*/ p0: B!): kotlin.Unit
}
public interface Super {
public abstract fun </*0*/ A : kotlin.(Mutable)List<kotlin.String!>!> foo(/*0*/ p0: A!): kotlin.Unit
}
}
@@ -1,14 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import java.lang.Cloneable;
public interface TwoBounds {
public interface Super {
@KotlinSignature("fun <A: CharSequence> foo(a: A) where A: Cloneable")
<A extends CharSequence & Cloneable> void foo(A a);
}
@@ -1,17 +1,12 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface TwoSuperclasses {
public interface Super1 {
@KotlinSignature("fun <A: CharSequence> foo(a: A)")
<A extends CharSequence> void foo(A a);
}
public interface Super2 {
@KotlinSignature("fun <B: CharSequence> foo(a: B)")
<B extends CharSequence> void foo(B a);
}
@@ -1,12 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface TwoTypeParameters {
public interface Super {
@KotlinSignature("fun <A: CharSequence, B: Cloneable> foo(a: A, b: B)")
<A extends CharSequence, B extends Cloneable> void foo(A a, B b);
}
@@ -1,13 +1,8 @@
package test;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface UseParameterAsUpperBound {
public interface Super {
@KotlinSignature("fun <A, B: A> foo(a: A, b: B)")
<A, B extends A> void foo(A a, B b);
}
@@ -1,13 +1,10 @@
package test;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface UseParameterInUpperBound {
public interface Super {
@KotlinSignature("fun <A, B: List<A>> foo(a: A, b: B)")
<A, B extends List<A>> void foo(A a, B b);
}
@@ -1,18 +1,14 @@
package test;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
public interface UseParameterInUpperBoundWithKotlinSignature {
public interface Super {
@KotlinSignature("fun <A, B: List<A>> foo(a: A, b: B)")
<A, B extends List<A>> void foo(A a, B b);
}
public interface Sub extends Super {
@KotlinSignature("fun <B, A: List<B>> foo(b: B, a: A)")
<B, A extends List<B>> void foo(B b, A a);
}
}