compiler testdata: s/trait/interface
This commit is contained in:
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait ChangeProjectionKind1 {
|
||||
public interface ChangeProjectionKind1 {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: MutableList<in String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: MutableList<in String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait ChangeProjectionKind2 {
|
||||
public interface ChangeProjectionKind2 {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: MutableList<String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: MutableList<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,18 +1,18 @@
|
||||
package test
|
||||
|
||||
public trait DeeplySubstitutedClassParameter {
|
||||
public interface DeeplySubstitutedClassParameter {
|
||||
|
||||
public trait Super<T> {
|
||||
public interface Super<T> {
|
||||
public fun foo(t: T)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Middle<E>: Super<E> {
|
||||
public interface Middle<E>: Super<E> {
|
||||
override fun foo(t: E)
|
||||
}
|
||||
|
||||
public trait Sub: Middle<String> {
|
||||
public interface Sub: Middle<String> {
|
||||
override fun foo(t: String)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
package test
|
||||
|
||||
public trait DeeplySubstitutedClassParameter2 {
|
||||
public interface DeeplySubstitutedClassParameter2 {
|
||||
|
||||
public trait Super<T> {
|
||||
public interface Super<T> {
|
||||
public fun foo(t: T)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Middle<E>: Super<E> {
|
||||
public interface Middle<E>: Super<E> {
|
||||
}
|
||||
|
||||
public trait Sub: Middle<String> {
|
||||
public interface Sub: Middle<String> {
|
||||
override fun foo(t: String)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritMutability {
|
||||
public interface InheritMutability {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: MutableList<String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: MutableList<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait InheritNotVararg {
|
||||
public interface InheritNotVararg {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: Array<out String>?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: Array<out String>?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait InheritNotVarargInteger {
|
||||
public interface InheritNotVarargInteger {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: Array<out Int>?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: Array<out Int>?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait InheritNotVarargNotNull {
|
||||
public interface InheritNotVarargNotNull {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: Array<out String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: Array<out String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritNotVarargPrimitive {
|
||||
public interface InheritNotVarargPrimitive {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: IntArray?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: IntArray?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritNullability {
|
||||
public interface InheritNullability {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: String)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: String)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait InheritProjectionKind {
|
||||
public interface InheritProjectionKind {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: MutableList<in String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: MutableList<in String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritReadOnliness {
|
||||
public interface InheritReadOnliness {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: List<String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: List<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritVararg {
|
||||
public interface InheritVararg {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(vararg p0: String?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(vararg p0: String?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritVarargInteger {
|
||||
public interface InheritVarargInteger {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(vararg p0: Int?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(vararg p0: Int?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
public trait InheritVarargNotNull {
|
||||
public interface InheritVarargNotNull {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(vararg p: String)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(vararg p: String)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait InheritVarargPrimitive {
|
||||
public interface InheritVarargPrimitive {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(vararg p0: Int)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(vararg p0: Int)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,20 +1,20 @@
|
||||
package test
|
||||
|
||||
// See SubclassFromGenericAndNot, as well
|
||||
public trait Kt3302 {
|
||||
public trait BSONObject {
|
||||
public interface Kt3302 {
|
||||
public interface BSONObject {
|
||||
public fun put(p0: String, p1: Any): Any?
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait LinkedHashMap<K, V> {
|
||||
public interface LinkedHashMap<K, V> {
|
||||
public fun put(key: K, value: V): V?
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait BasicBSONObject : LinkedHashMap<String, Any>, BSONObject {
|
||||
public interface BasicBSONObject : LinkedHashMap<String, Any>, BSONObject {
|
||||
override fun put(key: String, value: Any): Any?
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait MutableToReadOnly {
|
||||
public interface MutableToReadOnly {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: MutableList<String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: MutableList<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait NotNullToNullable {
|
||||
public interface NotNullToNullable {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: String)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: String)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait NullableToNotNull {
|
||||
public interface NullableToNotNull {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p0: String?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p0: String?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait NullableToNotNullKotlinSignature {
|
||||
public interface NullableToNotNullKotlinSignature {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: String?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: String?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait OverrideWithErasedParameter {
|
||||
public interface OverrideWithErasedParameter {
|
||||
|
||||
public trait Super<T> {
|
||||
public interface Super<T> {
|
||||
public fun foo(p0: T?)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub<T>: Super<T> {
|
||||
public interface Sub<T>: Super<T> {
|
||||
override fun foo(p0: T?)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait ReadOnlyToMutable {
|
||||
public interface ReadOnlyToMutable {
|
||||
|
||||
public trait Super {
|
||||
public interface Super {
|
||||
public fun foo(p: List<String>)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
public interface Sub: Super {
|
||||
override fun foo(p: List<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,21 +1,21 @@
|
||||
package test
|
||||
|
||||
// Extracted from KT-3302, see Kt3302 test, as well
|
||||
public trait SubclassFromGenericAndNot {
|
||||
public interface SubclassFromGenericAndNot {
|
||||
|
||||
public trait NonGeneric {
|
||||
public interface NonGeneric {
|
||||
public fun foo(p0: String)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Generic<T> {
|
||||
public interface Generic<T> {
|
||||
public fun foo(key: T)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub : NonGeneric, Generic<String> {
|
||||
public interface Sub : NonGeneric, Generic<String> {
|
||||
override fun foo(key: String)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
public trait SubstitutedClassParameter {
|
||||
public interface SubstitutedClassParameter {
|
||||
|
||||
public trait Super<T> {
|
||||
public interface Super<T> {
|
||||
public fun foo(t: T)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super<String> {
|
||||
public interface Sub: Super<String> {
|
||||
override fun foo(t: String)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,20 +1,20 @@
|
||||
package test
|
||||
|
||||
public trait SubstitutedClassParameters {
|
||||
public interface SubstitutedClassParameters {
|
||||
|
||||
public trait Super1<T> {
|
||||
public interface Super1<T> {
|
||||
public fun foo(t: T)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Super2<E> {
|
||||
public interface Super2<E> {
|
||||
public fun foo(t: E)
|
||||
|
||||
public fun dummy() // to avoid loading as SAM interface
|
||||
}
|
||||
|
||||
public trait Sub: Super1<String>, Super2<String> {
|
||||
public interface Sub: Super1<String>, Super2<String> {
|
||||
override fun foo(t: String)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user