diff --git a/compiler/testData/asJava/lightClassStructure/Declared.kt b/compiler/testData/asJava/lightClassStructure/Declared.kt index f8dbe82eafa..e09d095bfe4 100644 --- a/compiler/testData/asJava/lightClassStructure/Declared.kt +++ b/compiler/testData/asJava/lightClassStructure/Declared.kt @@ -23,7 +23,7 @@ final class Final // Special annotation class Annotation enum class Enum -trait Trait +interface Trait // Deprecation deprecated("") class Deprecated diff --git a/compiler/testData/asJava/lightClassStructure/DeclaredWithGenerics.kt b/compiler/testData/asJava/lightClassStructure/DeclaredWithGenerics.kt index 70e2c5e47e5..440a2203f1e 100644 --- a/compiler/testData/asJava/lightClassStructure/DeclaredWithGenerics.kt +++ b/compiler/testData/asJava/lightClassStructure/DeclaredWithGenerics.kt @@ -7,5 +7,5 @@ class Generic2 class Generic2WithBounds where A: Bound1, A: Bound2, B: Generic1 class Bound1 -trait Bound2 +interface Bound2 diff --git a/compiler/testData/asJava/lightClasses/delegation/Function.kt b/compiler/testData/asJava/lightClasses/delegation/Function.kt index 9fda4a47c45..2b0a72c3c32 100644 --- a/compiler/testData/asJava/lightClasses/delegation/Function.kt +++ b/compiler/testData/asJava/lightClasses/delegation/Function.kt @@ -1,6 +1,6 @@ // Derived -trait Base { +interface Base { fun baz(s: String): String } diff --git a/compiler/testData/asJava/lightClasses/delegation/Property.kt b/compiler/testData/asJava/lightClasses/delegation/Property.kt index ce590bfa050..7b2c815ace1 100644 --- a/compiler/testData/asJava/lightClasses/delegation/Property.kt +++ b/compiler/testData/asJava/lightClasses/delegation/Property.kt @@ -1,6 +1,6 @@ // Derived -trait Base { +interface Base { val boo: String } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt index 2541b473c8e..a1b5772cb8b 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt @@ -1,6 +1,6 @@ // Generic -trait Generic { +interface Generic { fun a(n: N): N fun b(nn: NN): NN diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt index 274a682a4f6..0bc3e928ac2 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt @@ -1,6 +1,6 @@ // C -trait Tr { +interface Tr { fun foo(): Any val v: Any } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt index 1efb58ec710..9915f6225bd 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt @@ -1,6 +1,6 @@ // C -trait Base { +interface Base { fun foo(): Any } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt index 7efecda0ad5..b586c4344c1 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt @@ -1,6 +1,6 @@ // Primitives -trait Primitives { +interface Primitives { fun int(x: Int): Int val nullableBool: Boolean? diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt index f15c852a545..3b69e0a805c 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt @@ -1,6 +1,6 @@ // PrivateInTrait -trait PrivateInTrait { +interface PrivateInTrait { private var nn: String get() = "" set(value) {} diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt index ebced47d04e..11d7f619b95 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt @@ -3,7 +3,7 @@ import org.jetbrains.annotations.NotNull import org.jetbrains.annotations.Nullable -trait Trait { +interface Trait { fun notNull(a: String): String fun nullable(a: String?): String? diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt index 73598d0f805..18550ad7fc4 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt @@ -1,6 +1,6 @@ // TraitClassObjectField -trait TraitClassObjectField { +interface TraitClassObjectField { companion object { val x: String? = "" private val y: String? = "" diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt index be4e460f616..a4ecf3d1916 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt @@ -1,6 +1,6 @@ // C -trait Base { +interface Base { fun foo(t: T): T } diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions index 28c356a8d57..8aa81131cf1 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions @@ -51,7 +51,7 @@ sink: INIT: in: {foo=ID} out: {foo=ID} USE: in: {} out: {} ===================== == Foo == -trait Foo { +interface Foo { var c: Int } --------------------- diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.kt b/compiler/testData/cfg-variables/basic/VariablesInitialization.kt index ae78a8a15e1..58f7e678bef 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.kt +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.kt @@ -11,6 +11,6 @@ fun bar(foo: Foo) { 42 } -trait Foo { +interface Foo { var c: Int } \ No newline at end of file diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.values b/compiler/testData/cfg-variables/basic/VariablesInitialization.values index 9401bee010c..9a9d3f560be 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.values +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.values @@ -28,7 +28,7 @@ foo : {<: Foo} NEW: r(foo) -> { foo.c foo.c = 2 42 } : * COPY ===================== == Foo == -trait Foo { +interface Foo { var c: Int } --------------------- diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions index b2917e4afd8..53d4756dcaf 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions @@ -1,5 +1,5 @@ == T == -trait T +interface T --------------------- L0: 1 diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt index 8071281842b..36d898f091b 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt @@ -1,4 +1,4 @@ -trait T +interface T class A(a: Int, b: Int): T diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values index c5f4dbea26c..c6d2ab9a9d1 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values @@ -1,5 +1,5 @@ == T == -trait T +interface T --------------------- ===================== == A == diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions index 33e977e7794..3bb05196aa5 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions @@ -1,5 +1,5 @@ == A == -trait A { +interface A { fun foo() : Int } --------------------- diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.kt b/compiler/testData/cfg/declarations/local/ObjectExpression.kt index cf5ba96f594..cac81104548 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.kt +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo() : Int } diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.values b/compiler/testData/cfg/declarations/local/ObjectExpression.values index 9f3d26b4b75..d9e98bf93d8 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.values +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.values @@ -1,5 +1,5 @@ == A == -trait A { +interface A { fun foo() : Int } --------------------- diff --git a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt index 7340ff8a25d..29e26a1bf18 100644 --- a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt +++ b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt @@ -1,7 +1,7 @@ -trait A { +interface A { public val c: Int } -trait B: A { +interface B: A { override protected private val c: Int } diff --git a/compiler/testData/cli/jvm/signatureClash.kt b/compiler/testData/cli/jvm/signatureClash.kt index e7e5eafa6d1..7dbda49c9db 100644 --- a/compiler/testData/cli/jvm/signatureClash.kt +++ b/compiler/testData/cli/jvm/signatureClash.kt @@ -12,7 +12,7 @@ class A : B() { fun getB(): Int = 1 val b: Int = 1 -trait Tr { +interface Tr { fun getTr() = 1 } diff --git a/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt b/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt index df593504f3d..4c81a02698d 100644 --- a/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt +++ b/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt @@ -1,5 +1,5 @@ package wrong -trait TraitWithDefault { +interface TraitWithDefault { fun foo() = 1 } \ No newline at end of file diff --git a/compiler/testData/cli/warnings.kt b/compiler/testData/cli/warnings.kt index ad276976b28..7a459c181d4 100644 --- a/compiler/testData/cli/warnings.kt +++ b/compiler/testData/cli/warnings.kt @@ -5,6 +5,6 @@ fun foo(p: Int??) { } -trait T { +interface T { abstract fun foo() } \ No newline at end of file diff --git a/compiler/testData/codegen/box/bridges/complexMultiInheritance.kt b/compiler/testData/codegen/box/bridges/complexMultiInheritance.kt index cce9635c317..2128aa8fab4 100644 --- a/compiler/testData/codegen/box/bridges/complexMultiInheritance.kt +++ b/compiler/testData/codegen/box/bridges/complexMultiInheritance.kt @@ -2,13 +2,13 @@ open class A { open fun foo(): Any = "A" } -trait B : A +interface B : A open class C : A() { override fun foo(): Int = 222 } -trait D { +interface D { fun foo(): Number } diff --git a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt index 18f692013e5..ce91d13f080 100644 --- a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt @@ -5,13 +5,13 @@ abstract class A { abstract fun foo(): List } -trait B { +interface B { fun foo(): ArrayList = ArrayList(Arrays.asList("B")) } open class C : A(), B -trait D { +interface D { fun foo(): Collection } diff --git a/compiler/testData/codegen/box/bridges/delegation.kt b/compiler/testData/codegen/box/bridges/delegation.kt index 41c3ddd3470..d0dd7aa00f0 100644 --- a/compiler/testData/codegen/box/bridges/delegation.kt +++ b/compiler/testData/codegen/box/bridges/delegation.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/codegen/box/bridges/delegationProperty.kt b/compiler/testData/codegen/box/bridges/delegationProperty.kt index 5ffd4270b87..768f010140f 100644 --- a/compiler/testData/codegen/box/bridges/delegationProperty.kt +++ b/compiler/testData/codegen/box/bridges/delegationProperty.kt @@ -1,4 +1,4 @@ -trait A { +interface A { var result: T } diff --git a/compiler/testData/codegen/box/bridges/diamond.kt b/compiler/testData/codegen/box/bridges/diamond.kt index 2e798707253..b1ea60973a5 100644 --- a/compiler/testData/codegen/box/bridges/diamond.kt +++ b/compiler/testData/codegen/box/bridges/diamond.kt @@ -1,10 +1,10 @@ -trait A { +interface A { fun foo(t: T, u: U) = "A" } -trait B : A +interface B : A -trait C : A +interface C : A class Z : B, C { override fun foo(t: String, u: Int) = "Z" diff --git a/compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt b/compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt index bb93071f603..e62de29d55a 100644 --- a/compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt +++ b/compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt @@ -1,6 +1,6 @@ // KT-4145 -trait A { +interface A { fun foo(): Any } diff --git a/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride1.kt b/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride1.kt index 78b90f2fe89..822954327ea 100644 --- a/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride1.kt +++ b/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride1.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(t: T): String } -trait B { +interface B { fun foo(t: Int) = "B" } diff --git a/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride2.kt b/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride2.kt index 2a946f96200..73a3d93682b 100644 --- a/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride2.kt +++ b/compiler/testData/codegen/box/bridges/fakeGenericContravariantOverride2.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(t: T): String } -trait B { +interface B { fun foo(a: T) = "B" } diff --git a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt index 0225c55c686..584d1ce3da3 100644 --- a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt +++ b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt @@ -1,6 +1,6 @@ // KT-3985 -trait Trait { +interface Trait { fun f(): T } diff --git a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt index 4fa2cc018a8..e794fa46083 100644 --- a/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt +++ b/compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(t: T): String } -trait B { +interface B { fun foo(t: Int) = "B" } diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideInTraitWithRequiredFromTraitImpl.kt b/compiler/testData/codegen/box/bridges/fakeOverrideInTraitWithRequiredFromTraitImpl.kt index ba0b79cbdda..fee76a53e9c 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideInTraitWithRequiredFromTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideInTraitWithRequiredFromTraitImpl.kt @@ -2,11 +2,11 @@ abstract class A { abstract fun foo(): Any } -trait B { +interface B { fun foo(): String = "B" } -trait C : A, B +interface C : A, B class D : A(), C diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideOfPropertySetterInTraitImpl.kt b/compiler/testData/codegen/box/bridges/fakeOverrideOfPropertySetterInTraitImpl.kt index 4a6a4a9e2fa..78126d2ac93 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideOfPropertySetterInTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideOfPropertySetterInTraitImpl.kt @@ -1,6 +1,6 @@ var result = "" -trait A { +interface A { var foo: String get() = result set(value) { diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt b/compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt index f8850de7c2b..1f023aad5ba 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt @@ -1,15 +1,15 @@ var result = "" -trait D1 { +interface D1 { fun foo(): D1 { result += "D1" return this } } -trait F2 : D1 +interface F2 : D1 -trait D3 : F2 { +interface D3 : F2 { override fun foo(): D3 { result += "D3" return this diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideWithImplementationInTrait.kt b/compiler/testData/codegen/box/bridges/fakeOverrideWithImplementationInTrait.kt index 3f3a0750cf1..843f133922b 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideWithImplementationInTrait.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideWithImplementationInTrait.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(): String = "A" } -trait B { +interface B { fun foo(): Any } diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt b/compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt index 04a752cf905..461f1b25c8b 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt @@ -1,12 +1,12 @@ -trait D1 { +interface D1 { fun foo(): Any } -trait D2 { +interface D2 { fun foo(): Number } -trait F3 : D1, D2 +interface F3 : D1, D2 open class D4 { fun foo(): Int = 42 diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt b/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt index a4d0a21e5f9..13b87b448a2 100644 --- a/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt +++ b/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt @@ -1,6 +1,6 @@ open data class A(val value: String) -trait B { +interface B { fun component1(): Any } diff --git a/compiler/testData/codegen/box/bridges/kt1939.kt b/compiler/testData/codegen/box/bridges/kt1939.kt index 81cc023ddaa..ff7e345fdde 100644 --- a/compiler/testData/codegen/box/bridges/kt1939.kt +++ b/compiler/testData/codegen/box/bridges/kt1939.kt @@ -2,7 +2,7 @@ abstract class Foo { fun hello(id: T) = "Hi $id" } -trait Tr { +interface Tr { fun hello(s : String) } diff --git a/compiler/testData/codegen/box/bridges/kt2833.kt b/compiler/testData/codegen/box/bridges/kt2833.kt index c5d90cbede8..50a2989d904 100644 --- a/compiler/testData/codegen/box/bridges/kt2833.kt +++ b/compiler/testData/codegen/box/bridges/kt2833.kt @@ -1,10 +1,10 @@ package test -public trait FunDependencyEdge { +public interface FunDependencyEdge { val from: FunctionNode } -public trait FunctionNode +public interface FunctionNode public class FunctionNodeImpl : FunctionNode diff --git a/compiler/testData/codegen/box/bridges/kt2920.kt b/compiler/testData/codegen/box/bridges/kt2920.kt index 07802cbaad3..0f71953ba12 100644 --- a/compiler/testData/codegen/box/bridges/kt2920.kt +++ b/compiler/testData/codegen/box/bridges/kt2920.kt @@ -1,4 +1,4 @@ -trait Tr { +interface Tr { val v: T } diff --git a/compiler/testData/codegen/box/bridges/kt318.kt b/compiler/testData/codegen/box/bridges/kt318.kt index c1929b1d81a..f454d01992d 100644 --- a/compiler/testData/codegen/box/bridges/kt318.kt +++ b/compiler/testData/codegen/box/bridges/kt318.kt @@ -1,9 +1,9 @@ var result = "" -trait Base +interface Base open class Child : Base -trait A { +interface A { fun foo(a : E) { result += "A" } diff --git a/compiler/testData/codegen/box/bridges/methodFromTrait.kt b/compiler/testData/codegen/box/bridges/methodFromTrait.kt index 95c87724b52..46bbf4e80fb 100644 --- a/compiler/testData/codegen/box/bridges/methodFromTrait.kt +++ b/compiler/testData/codegen/box/bridges/methodFromTrait.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T, u: U) = "A" } diff --git a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt index 46ea079d779..6a4fa135a71 100644 --- a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt +++ b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt @@ -1,11 +1,11 @@ import java.util.ArrayList import java.util.Arrays -trait A { +interface A { fun foo(): Collection } -trait B : A { +interface B : A { override fun foo(): MutableCollection } diff --git a/compiler/testData/codegen/box/bridges/objectClone.kt b/compiler/testData/codegen/box/bridges/objectClone.kt index 359cacc6764..266bd90f610 100644 --- a/compiler/testData/codegen/box/bridges/objectClone.kt +++ b/compiler/testData/codegen/box/bridges/objectClone.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: JVM import java.util.HashSet -trait A : Set +interface A : Set class B : A, HashSet() { override fun clone(): B = throw AssertionError() diff --git a/compiler/testData/codegen/box/bridges/propertyDiamond.kt b/compiler/testData/codegen/box/bridges/propertyDiamond.kt index 5f8a54a1588..802f6f77932 100644 --- a/compiler/testData/codegen/box/bridges/propertyDiamond.kt +++ b/compiler/testData/codegen/box/bridges/propertyDiamond.kt @@ -1,11 +1,11 @@ -trait A { +interface A { val o: O val k: K } -trait B : A +interface B : A -trait C : A +interface C : A class D : B, C { override val o = "O" diff --git a/compiler/testData/codegen/box/bridges/propertyInConstructor.kt b/compiler/testData/codegen/box/bridges/propertyInConstructor.kt index 1bc200b1b5c..9ca1e8bf8f5 100644 --- a/compiler/testData/codegen/box/bridges/propertyInConstructor.kt +++ b/compiler/testData/codegen/box/bridges/propertyInConstructor.kt @@ -1,4 +1,4 @@ -trait A { +interface A { var x: T } diff --git a/compiler/testData/codegen/box/bridges/propertySetter.kt b/compiler/testData/codegen/box/bridges/propertySetter.kt index b26bed9f0fb..a258dc85346 100644 --- a/compiler/testData/codegen/box/bridges/propertySetter.kt +++ b/compiler/testData/codegen/box/bridges/propertySetter.kt @@ -1,4 +1,4 @@ -trait A { +interface A { var v: T } diff --git a/compiler/testData/codegen/box/bridges/simpleEnum.kt b/compiler/testData/codegen/box/bridges/simpleEnum.kt index b4f682850ac..11b715d6c18 100644 --- a/compiler/testData/codegen/box/bridges/simpleEnum.kt +++ b/compiler/testData/codegen/box/bridges/simpleEnum.kt @@ -1,4 +1,4 @@ -trait A { +interface A { open fun foo(t: T) = "A" } diff --git a/compiler/testData/codegen/box/bridges/simpleTraitImpl.kt b/compiler/testData/codegen/box/bridges/simpleTraitImpl.kt index 9cd6c1d6b5f..4d2a723aaad 100644 --- a/compiler/testData/codegen/box/bridges/simpleTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/simpleTraitImpl.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T) = "A" } diff --git a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt index d469bf5d7f6..ae0d6317dfe 100644 --- a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt +++ b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun id(t: T): T } diff --git a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt index 747ca7f6549..ac9d01f3797 100644 --- a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt +++ b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt @@ -1,8 +1,8 @@ -trait A { +interface A { open fun foo(t: T) = "A" } -trait B : A +interface B : A enum class Z(val name: String) : B { Z1 : Z("Z1") diff --git a/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt b/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt index 1e5a588a0ab..93d02c7fa93 100644 --- a/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(): Any = "A" } -trait B : A { +interface B : A { override fun foo(): String = "B" } diff --git a/compiler/testData/codegen/box/bridges/traitWithRequiredCovariantOverride.kt b/compiler/testData/codegen/box/bridges/traitWithRequiredCovariantOverride.kt index 35e0c38a30c..997a5c33760 100644 --- a/compiler/testData/codegen/box/bridges/traitWithRequiredCovariantOverride.kt +++ b/compiler/testData/codegen/box/bridges/traitWithRequiredCovariantOverride.kt @@ -2,7 +2,7 @@ open class A { open fun foo(): Any = "A" } -trait B : A { +interface B : A { override fun foo(): String = "B" } diff --git a/compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt b/compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt index 8edaa868640..ba08200e6f2 100644 --- a/compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt +++ b/compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(t: T, u: Int) = "A" } -trait B { +interface B { fun foo(t: T, u: U) = "B" } diff --git a/compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt b/compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt index 22163c367ef..21ffaa75e18 100644 --- a/compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt +++ b/compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(t: T) = "A" } -trait B { +interface B { fun foo(t: T) = "B" } diff --git a/compiler/testData/codegen/box/builtinStubMethods/dontGenerateBodyInTrait.kt b/compiler/testData/codegen/box/builtinStubMethods/dontGenerateBodyInTrait.kt index 900d979832f..65cfb766528 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/dontGenerateBodyInTrait.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/dontGenerateBodyInTrait.kt @@ -1,10 +1,10 @@ -trait A : Collection -trait B : List -trait C : Map -trait D : Map.Entry -trait E : Iterator +interface A : Collection +interface B : List +interface C : Map +interface D : Map.Entry +interface E : Iterator fun box(): String { - trait F : A, B, C, D, E + interface F : A, B, C, D, E return "OK" } diff --git a/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt b/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt index d08887a8854..7baaa46e2f8 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt @@ -1,4 +1,4 @@ -trait Addable { +interface Addable { fun add(s: String): Boolean = true } diff --git a/compiler/testData/codegen/box/classes/classObjectInTrait.kt b/compiler/testData/codegen/box/classes/classObjectInTrait.kt index cff3e374654..e34f5622a3e 100644 --- a/compiler/testData/codegen/box/classes/classObjectInTrait.kt +++ b/compiler/testData/codegen/box/classes/classObjectInTrait.kt @@ -1,6 +1,6 @@ // EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final -trait C { +interface C { companion object { public val FOO: String = "OK" } diff --git a/compiler/testData/codegen/box/classes/delegation2.kt b/compiler/testData/codegen/box/classes/delegation2.kt index 83a4028d53e..81b8b0fb47e 100644 --- a/compiler/testData/codegen/box/classes/delegation2.kt +++ b/compiler/testData/codegen/box/classes/delegation2.kt @@ -1,8 +1,8 @@ -trait Trait1 { +interface Trait1 { fun foo() : String } -trait Trait2 { +interface Trait2 { fun bar() : String } diff --git a/compiler/testData/codegen/box/classes/delegation3.kt b/compiler/testData/codegen/box/classes/delegation3.kt index 33d2ed5b9e0..fd4f07800a2 100644 --- a/compiler/testData/codegen/box/classes/delegation3.kt +++ b/compiler/testData/codegen/box/classes/delegation3.kt @@ -1,8 +1,8 @@ -trait One { +interface One { public open fun foo() : Int public open fun faz() : Int = 10 } -trait Two { +interface Two { public open fun foo() : Int public open fun quux() : Int = 100 } diff --git a/compiler/testData/codegen/box/classes/delegation4.kt b/compiler/testData/codegen/box/classes/delegation4.kt index a37cb061d7c..d29ddb16c89 100644 --- a/compiler/testData/codegen/box/classes/delegation4.kt +++ b/compiler/testData/codegen/box/classes/delegation4.kt @@ -1,8 +1,8 @@ -open trait First { +open interface First { public open fun foo() : Int } -open trait Second : First { +open interface Second : First { public open fun bar() : Int } diff --git a/compiler/testData/codegen/box/classes/delegationGenericArg.kt b/compiler/testData/codegen/box/classes/delegationGenericArg.kt index fed9f214dd8..f298e834f79 100644 --- a/compiler/testData/codegen/box/classes/delegationGenericArg.kt +++ b/compiler/testData/codegen/box/classes/delegationGenericArg.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T): String } diff --git a/compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt b/compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt index b5da8aaffee..72e541b7f3b 100644 --- a/compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt +++ b/compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T): String } diff --git a/compiler/testData/codegen/box/classes/delegationGenericLongArg.kt b/compiler/testData/codegen/box/classes/delegationGenericLongArg.kt index df80d1064e6..8bd117f9fa1 100644 --- a/compiler/testData/codegen/box/classes/delegationGenericLongArg.kt +++ b/compiler/testData/codegen/box/classes/delegationGenericLongArg.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T, u: U): String } diff --git a/compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt b/compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt index dc84a1ed194..a8c0e37230c 100644 --- a/compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt +++ b/compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt @@ -1,14 +1,14 @@ package test -trait TextField { +interface TextField { fun getText(): String } -trait InputTextField : TextField { +interface InputTextField : TextField { fun setText(text: String) } -trait MooableTextField : InputTextField { +interface MooableTextField : InputTextField { fun moo(a: Int, b: Int, c: Int): Int } diff --git a/compiler/testData/codegen/box/classes/diamondInheritance.kt b/compiler/testData/codegen/box/classes/diamondInheritance.kt index 447036bf49b..f20f33ab2cd 100644 --- a/compiler/testData/codegen/box/classes/diamondInheritance.kt +++ b/compiler/testData/codegen/box/classes/diamondInheritance.kt @@ -5,7 +5,7 @@ open class Base() { } open class Left() : Base() {} -trait Right : Base {} +interface Right : Base {} class D() : Left(), Right diff --git a/compiler/testData/codegen/box/classes/funDelegation.kt b/compiler/testData/codegen/box/classes/funDelegation.kt index f940e8e16c9..2a75f698109 100644 --- a/compiler/testData/codegen/box/classes/funDelegation.kt +++ b/compiler/testData/codegen/box/classes/funDelegation.kt @@ -2,7 +2,7 @@ open class Base() { fun n(n : Int) : Int = n + 1 } -trait Abstract {} +interface Abstract {} class Derived1() : Base(), Abstract {} class Derived2() : Abstract, Base() {} diff --git a/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt b/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt index b7711f77748..dce4e5da005 100644 --- a/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt +++ b/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt @@ -1,6 +1,6 @@ import java.util.HashSet -trait A : Set +interface A : Set class B : A, HashSet() diff --git a/compiler/testData/codegen/box/classes/inheritance.kt b/compiler/testData/codegen/box/classes/inheritance.kt index 1b919497b5c..78d6d58fa3b 100644 --- a/compiler/testData/codegen/box/classes/inheritance.kt +++ b/compiler/testData/codegen/box/classes/inheritance.kt @@ -1,7 +1,7 @@ // Changed when traits were introduced. May not make sense any more open class X(val x : Int) {} -trait Y { +interface Y { abstract val y : Int } @@ -11,7 +11,7 @@ class Point(x : Int, yy : Int) : X(x) , Y { override val y : Int = yy } -trait Abstract {} +interface Abstract {} class P1(x : Int, yy : Y) : Abstract, X(x), Y by yy {} class P2(x : Int, yy : Y) : X(x), Abstract, Y by yy {} diff --git a/compiler/testData/codegen/box/classes/kt1345.kt b/compiler/testData/codegen/box/classes/kt1345.kt index 28d9467076a..3933f9c552e 100644 --- a/compiler/testData/codegen/box/classes/kt1345.kt +++ b/compiler/testData/codegen/box/classes/kt1345.kt @@ -1,10 +1,10 @@ -trait Creator { +interface Creator { fun create() : T } class Actor(val code: String = "OK") -trait Factory : Creator +interface Factory : Creator class MyFactory() : Factory { override fun create(): Actor = Actor() diff --git a/compiler/testData/codegen/box/classes/kt1918.kt b/compiler/testData/codegen/box/classes/kt1918.kt index 7dabde92a46..1da1471e2d3 100644 --- a/compiler/testData/codegen/box/classes/kt1918.kt +++ b/compiler/testData/codegen/box/classes/kt1918.kt @@ -1,7 +1,7 @@ class Bar { } -trait Foo { +interface Foo { fun xyzzy(x: Any?): String } diff --git a/compiler/testData/codegen/box/classes/kt2224.kt b/compiler/testData/codegen/box/classes/kt2224.kt index 83c8cb44b86..fe6d9bcbe48 100644 --- a/compiler/testData/codegen/box/classes/kt2224.kt +++ b/compiler/testData/codegen/box/classes/kt2224.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(): Int } diff --git a/compiler/testData/codegen/box/classes/kt2390.kt b/compiler/testData/codegen/box/classes/kt2390.kt index 18366e5222f..9d664ee825d 100644 --- a/compiler/testData/codegen/box/classes/kt2390.kt +++ b/compiler/testData/codegen/box/classes/kt2390.kt @@ -5,18 +5,18 @@ class JsonObject() { class JsonArray() { } -public trait Formatter { +public interface Formatter { public fun format(source: IN?): OUT } -public trait MultiFormatter { +public interface MultiFormatter { public fun format(source: Collection): OUT } public class Project() { } -public trait JsonFormatter: Formatter, MultiFormatter { +public interface JsonFormatter: Formatter, MultiFormatter { public override fun format(source: Collection): JsonArray { return JsonArray(); } diff --git a/compiler/testData/codegen/box/classes/kt2391.kt b/compiler/testData/codegen/box/classes/kt2391.kt index 005c5715d29..2176c01b98e 100644 --- a/compiler/testData/codegen/box/classes/kt2391.kt +++ b/compiler/testData/codegen/box/classes/kt2391.kt @@ -1,4 +1,4 @@ -public trait LoggerAware { +public interface LoggerAware { public val logger: StringBuilder } diff --git a/compiler/testData/codegen/box/classes/kt2477.kt b/compiler/testData/codegen/box/classes/kt2477.kt index a18e8731ab6..bd449eefb43 100644 --- a/compiler/testData/codegen/box/classes/kt2477.kt +++ b/compiler/testData/codegen/box/classes/kt2477.kt @@ -1,11 +1,11 @@ package test -trait A { +interface A { public val c: String get() = "OK" } -trait B { +interface B { protected val c: String } diff --git a/compiler/testData/codegen/box/classes/kt2532.kt b/compiler/testData/codegen/box/classes/kt2532.kt index a3a0a4a0d35..24d12e9f884 100644 --- a/compiler/testData/codegen/box/classes/kt2532.kt +++ b/compiler/testData/codegen/box/classes/kt2532.kt @@ -1,6 +1,6 @@ package foo -trait B { +interface B { val c: Int get() = 2 } diff --git a/compiler/testData/codegen/box/classes/kt2566.kt b/compiler/testData/codegen/box/classes/kt2566.kt index fff411738e8..6a134feb84f 100644 --- a/compiler/testData/codegen/box/classes/kt2566.kt +++ b/compiler/testData/codegen/box/classes/kt2566.kt @@ -6,7 +6,7 @@ open class B : A() { override fun foo() = super.foo() } -trait I +interface I class C : I, B() { override fun foo() = super.foo() diff --git a/compiler/testData/codegen/box/classes/kt285.kt b/compiler/testData/codegen/box/classes/kt285.kt index 4c47239d8ae..514d086e8d3 100644 --- a/compiler/testData/codegen/box/classes/kt285.kt +++ b/compiler/testData/codegen/box/classes/kt285.kt @@ -1,4 +1,4 @@ -trait Trait { +interface Trait { fun foo() = "O" override fun toString() = "K" } diff --git a/compiler/testData/codegen/box/classes/kt3001.kt b/compiler/testData/codegen/box/classes/kt3001.kt index 35925eade05..0524528ca1e 100644 --- a/compiler/testData/codegen/box/classes/kt3001.kt +++ b/compiler/testData/codegen/box/classes/kt3001.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val result: String } diff --git a/compiler/testData/codegen/box/classes/kt3414.kt b/compiler/testData/codegen/box/classes/kt3414.kt index 6770d466086..6b4a083eda9 100644 --- a/compiler/testData/codegen/box/classes/kt3414.kt +++ b/compiler/testData/codegen/box/classes/kt3414.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo(): Int } -trait B { +interface B { fun foo(): Int } diff --git a/compiler/testData/codegen/box/classes/kt3546.kt b/compiler/testData/codegen/box/classes/kt3546.kt index 4fb5ce41dd3..b4d36c1f3e6 100644 --- a/compiler/testData/codegen/box/classes/kt3546.kt +++ b/compiler/testData/codegen/box/classes/kt3546.kt @@ -1,12 +1,12 @@ -trait A { +interface A { fun test(): String } -trait B { +interface B { fun test(): String } -trait C: A, B +interface C: A, B class Z(val param: String): C { diff --git a/compiler/testData/codegen/box/classes/kt3862.kt b/compiler/testData/codegen/box/classes/kt3862.kt index c6d52a45fc4..6f020ac8ab0 100644 --- a/compiler/testData/codegen/box/classes/kt3862.kt +++ b/compiler/testData/codegen/box/classes/kt3862.kt @@ -2,7 +2,7 @@ open class A { open fun foo(a: T): Int = 2 } -trait B : A { +interface B : A { override fun foo(a: T): Int = 1 } diff --git a/compiler/testData/codegen/box/classes/propertyDelegation.kt b/compiler/testData/codegen/box/classes/propertyDelegation.kt index fcf720a21ba..5af5516c859 100644 --- a/compiler/testData/codegen/box/classes/propertyDelegation.kt +++ b/compiler/testData/codegen/box/classes/propertyDelegation.kt @@ -10,7 +10,7 @@ open class Base() { } } -trait Abstract {} +interface Abstract {} class Derived1() : Base(), Abstract {} class Derived2() : Abstract, Base() {} diff --git a/compiler/testData/codegen/box/classes/rightHandOverride.kt b/compiler/testData/codegen/box/classes/rightHandOverride.kt index 987da6bd6b0..2c5af2c9927 100644 --- a/compiler/testData/codegen/box/classes/rightHandOverride.kt +++ b/compiler/testData/codegen/box/classes/rightHandOverride.kt @@ -1,6 +1,6 @@ // Changed when traits were introduced. May not make sense any more -trait Left {} +interface Left {} open class Right() { open fun f() = 42 } diff --git a/compiler/testData/codegen/box/classes/typedDelegation.kt b/compiler/testData/codegen/box/classes/typedDelegation.kt index 0ffd3265146..e0b1241a6aa 100644 --- a/compiler/testData/codegen/box/classes/typedDelegation.kt +++ b/compiler/testData/codegen/box/classes/typedDelegation.kt @@ -1,4 +1,4 @@ -trait A { +interface A { var zzzValue : T fun zzz() : T } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt index 57d93cb270a..e2c507f3b28 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt index 03bdb3b499a..7b4828fa7b5 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt index 15769f77148..8f1846f7cfb 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt index 2dfd7949ca6..0bb07f581b9 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt index 934d0b58ec7..2f7ff86a10c 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt index 4dc735a2bf7..3d600017d08 100644 --- a/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt +++ b/compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun result(): String } diff --git a/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt b/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt index 0133c48cc07..b19e4b61b0d 100644 --- a/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt +++ b/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt @@ -24,7 +24,7 @@ class LI : ListTag() {} public fun ListTag.item(body: LI.() -> Unit): Unit {} fun HtmlTag.a(contents: A.() -> Unit) {} -trait A : HtmlTag { +interface A : HtmlTag { public var text: String } diff --git a/compiler/testData/codegen/box/controlStructures/emptyFor.kt b/compiler/testData/codegen/box/controlStructures/emptyFor.kt index fc3f6332871..e39e3997923 100644 --- a/compiler/testData/codegen/box/controlStructures/emptyFor.kt +++ b/compiler/testData/codegen/box/controlStructures/emptyFor.kt @@ -1,6 +1,6 @@ var index = 0 -trait IterableIterator : Iterator { +interface IterableIterator : Iterator { fun iterator(): Iterator = this } diff --git a/compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt b/compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt index ba7df2c9e0b..06b181e10b6 100644 --- a/compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt +++ b/compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt @@ -1,4 +1,4 @@ -trait Foo { +interface Foo { fun foo(a: Double = 1.0): Double } diff --git a/compiler/testData/codegen/box/defaultArguments/function/trait.kt b/compiler/testData/codegen/box/defaultArguments/function/trait.kt index b986362f653..91bafe072f3 100644 --- a/compiler/testData/codegen/box/defaultArguments/function/trait.kt +++ b/compiler/testData/codegen/box/defaultArguments/function/trait.kt @@ -1,5 +1,5 @@ -trait Base { - fun bar(a: String = "abc"): String = a + " from trait" +interface Base { + fun bar(a: String = "abc"): String = a + " from interface" } class Derived: Base { diff --git a/compiler/testData/codegen/box/delegatedProperty/inTrait.kt b/compiler/testData/codegen/box/delegatedProperty/inTrait.kt index f9802ba1e3f..1f5e64731a9 100644 --- a/compiler/testData/codegen/box/delegatedProperty/inTrait.kt +++ b/compiler/testData/codegen/box/delegatedProperty/inTrait.kt @@ -2,7 +2,7 @@ class Delegate { fun get(t: Any?, p: PropertyMetadata): Int = 1 } -trait A { +interface A { val prop: Int } diff --git a/compiler/testData/codegen/box/delegatedProperty/kt4138.kt b/compiler/testData/codegen/box/delegatedProperty/kt4138.kt index d4e52b824b5..f1f85eeaee1 100644 --- a/compiler/testData/codegen/box/delegatedProperty/kt4138.kt +++ b/compiler/testData/codegen/box/delegatedProperty/kt4138.kt @@ -11,7 +11,7 @@ class Foo (val f: Int) { } } -trait FooTrait { +interface FooTrait { companion object { val A: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11)) diff --git a/compiler/testData/codegen/box/delegatedProperty/propertyDelegatedMethod/inTrait.kt b/compiler/testData/codegen/box/delegatedProperty/propertyDelegatedMethod/inTrait.kt index c721d6b81b9..370b3ec7275 100644 --- a/compiler/testData/codegen/box/delegatedProperty/propertyDelegatedMethod/inTrait.kt +++ b/compiler/testData/codegen/box/delegatedProperty/propertyDelegatedMethod/inTrait.kt @@ -4,7 +4,7 @@ class Delegate { fun propertyDelegated(p: PropertyMetadata) { name = p.name } } -trait A { +interface A { val prop: String } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt index 74cb9e4c24e..45495ff0179 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt @@ -1,4 +1,4 @@ -trait B +interface B fun B.invoke(i: Int) = i diff --git a/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt b/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt index a371c7e27ae..7659029d2b6 100644 --- a/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt +++ b/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt @@ -11,6 +11,6 @@ enum class MyEnum : T { } } -trait T { +interface T { fun f(): String } \ No newline at end of file diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt index 2e742d78312..5174d4cc374 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt @@ -1,4 +1,4 @@ -trait Expr { +interface Expr { public fun ttFun() : Int = 12 } diff --git a/compiler/testData/codegen/box/extensionFunctions/kt606.kt b/compiler/testData/codegen/box/extensionFunctions/kt606.kt index ed62435c2c9..5e1de696f70 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt606.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt606.kt @@ -10,7 +10,7 @@ class StandardPipelineFactory(val config : ChannelPipeline.() -> Unit) : Channel } } -trait ChannelPipeline { +interface ChannelPipeline { fun print(any: Any) } @@ -19,7 +19,7 @@ class DefaultChannelPipeline : ChannelPipeline { } -trait ChannelPipelineFactory { +interface ChannelPipelineFactory { fun getPipeline() : ChannelPipeline } diff --git a/compiler/testData/codegen/box/fakeOverride/diamondFunction.kt b/compiler/testData/codegen/box/fakeOverride/diamondFunction.kt index 7c150aaaa7b..da73cd28d7f 100644 --- a/compiler/testData/codegen/box/fakeOverride/diamondFunction.kt +++ b/compiler/testData/codegen/box/fakeOverride/diamondFunction.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun foo(): Unit } @@ -6,7 +6,7 @@ open class A : T { override fun foo() {} } -trait B : T +interface B : T class C : A(), B class D : B, A() diff --git a/compiler/testData/codegen/box/fakeOverride/function.kt b/compiler/testData/codegen/box/fakeOverride/function.kt index 1158cddb0c9..af0e02f4f49 100644 --- a/compiler/testData/codegen/box/fakeOverride/function.kt +++ b/compiler/testData/codegen/box/fakeOverride/function.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun foo(): Unit } @@ -9,7 +9,7 @@ open class A : T { class B : A(), T class C : T, A() -trait U : T +interface U : T class D : U, A() class E : A(), U class F : U, T, A() diff --git a/compiler/testData/codegen/box/fakeOverride/propertyGetter.kt b/compiler/testData/codegen/box/fakeOverride/propertyGetter.kt index 0c86e6eacab..c032e3ab837 100644 --- a/compiler/testData/codegen/box/fakeOverride/propertyGetter.kt +++ b/compiler/testData/codegen/box/fakeOverride/propertyGetter.kt @@ -1,4 +1,4 @@ -trait T { +interface T { val foo: String } @@ -9,7 +9,7 @@ open class A : T { class B : A(), T class C : T, A() -trait U : T +interface U : T class D : U, A() class E : A(), U diff --git a/compiler/testData/codegen/box/fakeOverride/propertySetter.kt b/compiler/testData/codegen/box/fakeOverride/propertySetter.kt index 2103491b1ad..c2f623ba448 100644 --- a/compiler/testData/codegen/box/fakeOverride/propertySetter.kt +++ b/compiler/testData/codegen/box/fakeOverride/propertySetter.kt @@ -1,4 +1,4 @@ -trait T { +interface T { var result: String } diff --git a/compiler/testData/codegen/box/functions/defaultargs4.kt b/compiler/testData/codegen/box/functions/defaultargs4.kt index 045f17be11f..b98b9a95d64 100644 --- a/compiler/testData/codegen/box/functions/defaultargs4.kt +++ b/compiler/testData/codegen/box/functions/defaultargs4.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun bar2(arg: Int = 239) : Int fun bar(arg: Int = 240) : Int = bar2(arg/2) diff --git a/compiler/testData/codegen/box/functions/defaultargs6.kt b/compiler/testData/codegen/box/functions/defaultargs6.kt index 21a9faeae3f..90c4e943d5d 100644 --- a/compiler/testData/codegen/box/functions/defaultargs6.kt +++ b/compiler/testData/codegen/box/functions/defaultargs6.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z } diff --git a/compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt b/compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt index 862108d8b89..0086f8ab719 100644 --- a/compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt +++ b/compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt @@ -1,12 +1,12 @@ -trait Named { +interface Named { abstract fun getName() : String; } -trait MemberDescriptor : Named {} +interface MemberDescriptor : Named {} -trait ClassifierDescriptor : Named {} +interface ClassifierDescriptor : Named {} -trait ClassDescriptor : MemberDescriptor, ClassifierDescriptor {} +interface ClassDescriptor : MemberDescriptor, ClassifierDescriptor {} class ClassDescriptorImpl : ClassDescriptor { override fun getName(): String { diff --git a/compiler/testData/codegen/box/functions/kt1199.kt b/compiler/testData/codegen/box/functions/kt1199.kt index 0d1899c549e..b29953c4862 100644 --- a/compiler/testData/codegen/box/functions/kt1199.kt +++ b/compiler/testData/codegen/box/functions/kt1199.kt @@ -1,5 +1,5 @@ -trait MyIterator { +interface MyIterator { fun hasNext() : Boolean fun next() : T } diff --git a/compiler/testData/codegen/box/functions/kt1413.kt b/compiler/testData/codegen/box/functions/kt1413.kt index 6cc787850e1..15b496fb9b9 100644 --- a/compiler/testData/codegen/box/functions/kt1413.kt +++ b/compiler/testData/codegen/box/functions/kt1413.kt @@ -1,6 +1,6 @@ package t -trait I{ +interface I{ fun f() } diff --git a/compiler/testData/codegen/box/functions/kt1649_1.kt b/compiler/testData/codegen/box/functions/kt1649_1.kt index ef16a4645a6..849bf5525ff 100644 --- a/compiler/testData/codegen/box/functions/kt1649_1.kt +++ b/compiler/testData/codegen/box/functions/kt1649_1.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val method : (() -> Unit)? } diff --git a/compiler/testData/codegen/box/functions/kt1649_2.kt b/compiler/testData/codegen/box/functions/kt1649_2.kt index e75d9cb4b62..33f420dc3f9 100644 --- a/compiler/testData/codegen/box/functions/kt1649_2.kt +++ b/compiler/testData/codegen/box/functions/kt1649_2.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val method : () -> Unit? } diff --git a/compiler/testData/codegen/box/innerNested/kt3132.kt b/compiler/testData/codegen/box/innerNested/kt3132.kt index 9428d2d7fe7..afcee1c6ca1 100644 --- a/compiler/testData/codegen/box/innerNested/kt3132.kt +++ b/compiler/testData/codegen/box/innerNested/kt3132.kt @@ -1,5 +1,5 @@ class Test { - trait Foo { } + interface Foo { } class FooImplNested: Foo { } diff --git a/compiler/testData/codegen/box/labels/propertyAccessorObject.kt b/compiler/testData/codegen/box/labels/propertyAccessorObject.kt index 3459ad58cce..1fc9f25aa82 100644 --- a/compiler/testData/codegen/box/labels/propertyAccessorObject.kt +++ b/compiler/testData/codegen/box/labels/propertyAccessorObject.kt @@ -1,4 +1,4 @@ -trait Base { +interface Base { fun foo(): Int } diff --git a/compiler/testData/codegen/box/localClasses/kt2700.kt b/compiler/testData/codegen/box/localClasses/kt2700.kt index f6964fb8e1e..3baacf0b21f 100644 --- a/compiler/testData/codegen/box/localClasses/kt2700.kt +++ b/compiler/testData/codegen/box/localClasses/kt2700.kt @@ -1,6 +1,6 @@ package a.b -trait Test { +interface Test { fun invoke(): String { return "OK" } diff --git a/compiler/testData/codegen/box/localClasses/kt3210.kt b/compiler/testData/codegen/box/localClasses/kt3210.kt index da90a52d584..12c9b1cba6e 100644 --- a/compiler/testData/codegen/box/localClasses/kt3210.kt +++ b/compiler/testData/codegen/box/localClasses/kt3210.kt @@ -1,12 +1,12 @@ package org.example -trait SomeTrait {} +interface SomeTrait {} -trait KotlinProcessor { +interface KotlinProcessor { fun execute(callback: KotlinCallback?); } -trait KotlinCallback { +interface KotlinCallback { fun on(t : T); } diff --git a/compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt b/compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt index a46db9d4e66..4765e8858ba 100644 --- a/compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt +++ b/compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun foo(): String } diff --git a/compiler/testData/codegen/box/objects/kt4086.kt b/compiler/testData/codegen/box/objects/kt4086.kt index e28c8e5fca4..2aa1ca343d8 100644 --- a/compiler/testData/codegen/box/objects/kt4086.kt +++ b/compiler/testData/codegen/box/objects/kt4086.kt @@ -1,4 +1,4 @@ -trait N +interface N open class Base(n: N) diff --git a/compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt b/compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt index ad0d2513d01..c239a3eff27 100644 --- a/compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt +++ b/compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt @@ -4,7 +4,7 @@ open class A { } } -trait T { +interface T { open fun foo(): Int { return 3 } diff --git a/compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt b/compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt index 833336b325c..5b71ab435fe 100644 --- a/compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt +++ b/compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt @@ -1,4 +1,4 @@ -trait T +interface T object Foo { private fun foo(p: T) = p diff --git a/compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt b/compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt index fec5ac5bfa0..957816c8974 100644 --- a/compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt +++ b/compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt @@ -1,4 +1,4 @@ -trait A : Comparable +interface A : Comparable class B(val x: Int) : A { override fun compareTo(other: A) = x.compareTo((other as B).x) diff --git a/compiler/testData/codegen/box/properties/kt1714.kt b/compiler/testData/codegen/box/properties/kt1714.kt index 655312cc2b7..87696e39e7f 100644 --- a/compiler/testData/codegen/box/properties/kt1714.kt +++ b/compiler/testData/codegen/box/properties/kt1714.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val method : (() -> Unit )? val test : Integer } diff --git a/compiler/testData/codegen/box/properties/kt1714_minimal.kt b/compiler/testData/codegen/box/properties/kt1714_minimal.kt index dd255aa79f7..e453069c4ad 100644 --- a/compiler/testData/codegen/box/properties/kt1714_minimal.kt +++ b/compiler/testData/codegen/box/properties/kt1714_minimal.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val v: Int } diff --git a/compiler/testData/codegen/box/properties/kt2655.kt b/compiler/testData/codegen/box/properties/kt2655.kt index 36244dcee3f..3956fb3a17d 100644 --- a/compiler/testData/codegen/box/properties/kt2655.kt +++ b/compiler/testData/codegen/box/properties/kt2655.kt @@ -1,4 +1,4 @@ -trait TextField { +interface TextField { fun getText(): String fun setText(text: String) } diff --git a/compiler/testData/codegen/box/properties/kt2786.kt b/compiler/testData/codegen/box/properties/kt2786.kt index 7b813217918..003ca536275 100644 --- a/compiler/testData/codegen/box/properties/kt2786.kt +++ b/compiler/testData/codegen/box/properties/kt2786.kt @@ -1,4 +1,4 @@ -trait FooTrait { +interface FooTrait { val propertyTest: String } diff --git a/compiler/testData/codegen/box/properties/kt4373.kt b/compiler/testData/codegen/box/properties/kt4373.kt index 74d2ae00485..41b781f2cfc 100644 --- a/compiler/testData/codegen/box/properties/kt4373.kt +++ b/compiler/testData/codegen/box/properties/kt4373.kt @@ -1,4 +1,4 @@ -trait Tr { +interface Tr { val prop: T } diff --git a/compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt b/compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt index eabdf4c4050..e8039fa4cc7 100644 --- a/compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt +++ b/compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt @@ -1,4 +1,4 @@ -trait R> { +interface R> { var value: T } diff --git a/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt b/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt index c757476551a..315732f3f1f 100644 --- a/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt +++ b/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt @@ -3,7 +3,7 @@ class Holder(var value: Int) { fun set(that: Any?, desc: PropertyMetadata, newValue: Int) { value = newValue } } -trait R> { +interface R> { var value: T } diff --git a/compiler/testData/codegen/box/properties/traitExtendsClass.kt b/compiler/testData/codegen/box/properties/traitExtendsClass.kt index 96726168446..d1aa10bec1a 100644 --- a/compiler/testData/codegen/box/properties/traitExtendsClass.kt +++ b/compiler/testData/codegen/box/properties/traitExtendsClass.kt @@ -2,7 +2,7 @@ open class Base { val pr : String = "OK" } -trait Trait : Base { +interface Trait : Base { fun f() : String { return this.pr } diff --git a/compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt b/compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt index 2ab364d1d71..16f433527f9 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(): String } diff --git a/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt b/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt index 29d7cbd13ec..c147c0b8b1c 100644 --- a/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt +++ b/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt @@ -1,6 +1,6 @@ import java.util.ArrayList -trait Tr { +interface Tr { fun extra() : String = "_" } diff --git a/compiler/testData/codegen/box/super/enclosedFun.kt b/compiler/testData/codegen/box/super/enclosedFun.kt index 1bc7a0a7640..5f317b46f77 100644 --- a/compiler/testData/codegen/box/super/enclosedFun.kt +++ b/compiler/testData/codegen/box/super/enclosedFun.kt @@ -1,8 +1,8 @@ -trait BK { +interface BK { fun x() : Int = 50 } -trait K : BK { +interface K : BK { override fun x() : Int = super.x() * 2 } diff --git a/compiler/testData/codegen/box/super/innerClassLabeledSuper.kt b/compiler/testData/codegen/box/super/innerClassLabeledSuper.kt index 9d405bd2317..cbb0a875df9 100644 --- a/compiler/testData/codegen/box/super/innerClassLabeledSuper.kt +++ b/compiler/testData/codegen/box/super/innerClassLabeledSuper.kt @@ -1,9 +1,9 @@ -trait BK { +interface BK { fun foo(): String fun bar(): String } -trait K : BK { +interface K : BK { override fun foo() = bar() } diff --git a/compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt b/compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt index f7681e7e67e..1a0bca8c437 100644 --- a/compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt +++ b/compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt @@ -1,10 +1,10 @@ //inspired by kt3492 -trait BK { +interface BK { fun foo(): String fun bar(): String } -trait KTrait: BK { +interface KTrait: BK { override fun foo() = bar() } diff --git a/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt b/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt index 4f4a62f8850..bb8098564f6 100644 --- a/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt +++ b/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt @@ -1,4 +1,4 @@ -trait Base { +interface Base { val foo: String fun bar(): String } diff --git a/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt b/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt index ad6f8ddf94c..effc71e7925 100644 --- a/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt +++ b/compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt @@ -1,5 +1,5 @@ //inspired by kt3492 -trait Base { +interface Base { val foo: String fun bar(): String } diff --git a/compiler/testData/codegen/box/super/kt3492TraitFun.kt b/compiler/testData/codegen/box/super/kt3492TraitFun.kt index 19c9a2920c0..144e86036a3 100644 --- a/compiler/testData/codegen/box/super/kt3492TraitFun.kt +++ b/compiler/testData/codegen/box/super/kt3492TraitFun.kt @@ -1,4 +1,4 @@ -trait ATrait { +interface ATrait { open fun foo2(): String = "OK" } diff --git a/compiler/testData/codegen/box/super/kt3492TraitProperty.kt b/compiler/testData/codegen/box/super/kt3492TraitProperty.kt index bfd7859f19f..c4c3298afcb 100644 --- a/compiler/testData/codegen/box/super/kt3492TraitProperty.kt +++ b/compiler/testData/codegen/box/super/kt3492TraitProperty.kt @@ -1,4 +1,4 @@ -trait A { +interface A { open val foo: String get() = "OK" } diff --git a/compiler/testData/codegen/box/super/kt3538.kt b/compiler/testData/codegen/box/super/kt3538.kt index 47656e7b4df..7186da045ec 100644 --- a/compiler/testData/codegen/box/super/kt3538.kt +++ b/compiler/testData/codegen/box/super/kt3538.kt @@ -4,7 +4,7 @@ open class Base { } } -trait Trait: Base { +interface Trait: Base { override fun sayHello(): String { return "K" } diff --git a/compiler/testData/codegen/box/super/multipleSuperTraits.kt b/compiler/testData/codegen/box/super/multipleSuperTraits.kt index 2312888b2fa..2ddb25d35b9 100644 --- a/compiler/testData/codegen/box/super/multipleSuperTraits.kt +++ b/compiler/testData/codegen/box/super/multipleSuperTraits.kt @@ -1,8 +1,8 @@ -trait T1 { +interface T1 { fun foo() = "O" } -trait T2 { +interface T2 { fun foo() = "K" } diff --git a/compiler/testData/codegen/box/super/traitproperty.kt b/compiler/testData/codegen/box/super/traitproperty.kt index 820d99402a7..a5de71c24eb 100644 --- a/compiler/testData/codegen/box/super/traitproperty.kt +++ b/compiler/testData/codegen/box/super/traitproperty.kt @@ -1,4 +1,4 @@ -trait M { +interface M { var backingB : Int var b : Int get() = backingB diff --git a/compiler/testData/codegen/box/superConstructorCall/deepLocalHierarchy.kt b/compiler/testData/codegen/box/superConstructorCall/deepLocalHierarchy.kt index 51a059cb0a3..534370e134e 100644 --- a/compiler/testData/codegen/box/superConstructorCall/deepLocalHierarchy.kt +++ b/compiler/testData/codegen/box/superConstructorCall/deepLocalHierarchy.kt @@ -1,5 +1,5 @@ fun box(): String { - open trait L1 { + open interface L1 { fun foo(): String } diff --git a/compiler/testData/codegen/box/traits/finalMethod.kt b/compiler/testData/codegen/box/traits/finalMethod.kt index 1469b0e10fb..443d02c1cf4 100644 --- a/compiler/testData/codegen/box/traits/finalMethod.kt +++ b/compiler/testData/codegen/box/traits/finalMethod.kt @@ -1,6 +1,6 @@ //KT-2382 -trait T { +interface T { final fun foo() = "OK" } diff --git a/compiler/testData/codegen/box/traits/genericMethod.kt b/compiler/testData/codegen/box/traits/genericMethod.kt index 06fa2f35a31..e3d47b24181 100644 --- a/compiler/testData/codegen/box/traits/genericMethod.kt +++ b/compiler/testData/codegen/box/traits/genericMethod.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val property : T open fun a() : T { diff --git a/compiler/testData/codegen/box/traits/inheritedFun.kt b/compiler/testData/codegen/box/traits/inheritedFun.kt index 1262b29ba06..756aed226c7 100644 --- a/compiler/testData/codegen/box/traits/inheritedFun.kt +++ b/compiler/testData/codegen/box/traits/inheritedFun.kt @@ -1,5 +1,5 @@ //KT-2206 -trait A { +interface A { fun f():Int = 239 } diff --git a/compiler/testData/codegen/box/traits/inheritedVar.kt b/compiler/testData/codegen/box/traits/inheritedVar.kt index f1aa0ab825b..887f33c2178 100644 --- a/compiler/testData/codegen/box/traits/inheritedVar.kt +++ b/compiler/testData/codegen/box/traits/inheritedVar.kt @@ -1,6 +1,6 @@ //KT-2206 -trait A { +interface A { var a:Int get() = 239 set(value) { diff --git a/compiler/testData/codegen/box/traits/kt1936.kt b/compiler/testData/codegen/box/traits/kt1936.kt index 7361d996893..0764dca3de4 100644 --- a/compiler/testData/codegen/box/traits/kt1936.kt +++ b/compiler/testData/codegen/box/traits/kt1936.kt @@ -1,6 +1,6 @@ var result = "Fail" -trait MyTrait +interface MyTrait { var property : String fun foo() { diff --git a/compiler/testData/codegen/box/traits/kt1936_1.kt b/compiler/testData/codegen/box/traits/kt1936_1.kt index b79da2cf44e..c3c6ef815f6 100644 --- a/compiler/testData/codegen/box/traits/kt1936_1.kt +++ b/compiler/testData/codegen/box/traits/kt1936_1.kt @@ -1,4 +1,4 @@ -trait MyTrait +interface MyTrait { var property : String fun foo() = property diff --git a/compiler/testData/codegen/box/traits/kt2260.kt b/compiler/testData/codegen/box/traits/kt2260.kt index b3f39f8234c..f63a2220542 100644 --- a/compiler/testData/codegen/box/traits/kt2260.kt +++ b/compiler/testData/codegen/box/traits/kt2260.kt @@ -1,4 +1,4 @@ -trait Flusher { +interface Flusher { fun flush() = "OK" } diff --git a/compiler/testData/codegen/box/traits/kt2399.kt b/compiler/testData/codegen/box/traits/kt2399.kt index d53fc22bf53..6d26c72c134 100644 --- a/compiler/testData/codegen/box/traits/kt2399.kt +++ b/compiler/testData/codegen/box/traits/kt2399.kt @@ -10,15 +10,15 @@ class ProjectInfo { override fun toString(): String = "OK" } -public trait Parser { +public interface Parser { public fun parse(source: IN): OUT } -public trait MultiParser { +public interface MultiParser { public fun parse(source: IN): Collection } -public trait JsonParser: Parser, MultiParser { +public interface JsonParser: Parser, MultiParser { public override fun parse(source: JsonArray): Collection { return ArrayList() } diff --git a/compiler/testData/codegen/box/traits/kt2541.kt b/compiler/testData/codegen/box/traits/kt2541.kt index c054d5fbadc..5be4abf0272 100644 --- a/compiler/testData/codegen/box/traits/kt2541.kt +++ b/compiler/testData/codegen/box/traits/kt2541.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(t: T, u: U) = "OK" } diff --git a/compiler/testData/codegen/box/traits/kt3315.kt b/compiler/testData/codegen/box/traits/kt3315.kt index 7a0e3262554..91f7f81a489 100644 --- a/compiler/testData/codegen/box/traits/kt3315.kt +++ b/compiler/testData/codegen/box/traits/kt3315.kt @@ -1,4 +1,4 @@ -trait B { +interface B { fun foo(dd: T): T = dd } diff --git a/compiler/testData/codegen/box/traits/kt3500.kt b/compiler/testData/codegen/box/traits/kt3500.kt index ba3e63ce5ca..18433df514a 100644 --- a/compiler/testData/codegen/box/traits/kt3500.kt +++ b/compiler/testData/codegen/box/traits/kt3500.kt @@ -1,8 +1,8 @@ -trait BK { +interface BK { fun foo(): String = 10.toString() } -trait KTrait: BK { +interface KTrait: BK { override fun foo() = 30.toString() } diff --git a/compiler/testData/codegen/box/traits/kt5495.kt b/compiler/testData/codegen/box/traits/kt5495.kt index 7a78baa0b9b..5d541929589 100644 --- a/compiler/testData/codegen/box/traits/kt5495.kt +++ b/compiler/testData/codegen/box/traits/kt5495.kt @@ -1,5 +1,5 @@ fun box(): String { - trait A { + interface A { fun foo() = "OK" } diff --git a/compiler/testData/codegen/box/traits/multiple.kt b/compiler/testData/codegen/box/traits/multiple.kt index da0c9da4a36..bc6470c0d6b 100644 --- a/compiler/testData/codegen/box/traits/multiple.kt +++ b/compiler/testData/codegen/box/traits/multiple.kt @@ -1,8 +1,8 @@ -trait AL { +interface AL { fun get(index: Int) : Any? = null } -trait ALE : AL { +interface ALE : AL { fun getOrNull(index: Int, value: T) : T { val r = get(index) as? T return r ?: value diff --git a/compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt b/compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt index 64b307eb1f9..5dee33c0792 100644 --- a/compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt +++ b/compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt @@ -4,7 +4,7 @@ open class B { class BB : B() -trait Z { +interface Z { fun T.getString() : String { return p } diff --git a/compiler/testData/codegen/box/traits/withRequired/generic.kt b/compiler/testData/codegen/box/traits/withRequired/generic.kt index bb5f05817b9..75d26e62299 100644 --- a/compiler/testData/codegen/box/traits/withRequired/generic.kt +++ b/compiler/testData/codegen/box/traits/withRequired/generic.kt @@ -2,7 +2,7 @@ open class AL { fun get(index: Int) : T? = null } -trait ALE : AL { +interface ALE : AL { fun getOrValue(index: Int, value : T) : T = get(index) ?: value } diff --git a/compiler/testData/codegen/box/traits/withRequired/genericProperty.kt b/compiler/testData/codegen/box/traits/withRequired/genericProperty.kt index 23019a5e84b..2579ef900b5 100644 --- a/compiler/testData/codegen/box/traits/withRequired/genericProperty.kt +++ b/compiler/testData/codegen/box/traits/withRequired/genericProperty.kt @@ -2,7 +2,7 @@ abstract class Base { abstract var s: T } -trait Trait : Base { +interface Trait : Base { var value : T get() = s set(value) { s = value } diff --git a/compiler/testData/codegen/box/traits/withRequired/kt1936_2.kt b/compiler/testData/codegen/box/traits/withRequired/kt1936_2.kt index d892033bb6b..8c17c464421 100644 --- a/compiler/testData/codegen/box/traits/withRequired/kt1936_2.kt +++ b/compiler/testData/codegen/box/traits/withRequired/kt1936_2.kt @@ -2,7 +2,7 @@ open class MyClass(param : String) { var propterty = param } -trait MyTrait : MyClass +interface MyTrait : MyClass { fun foo() = propterty } diff --git a/compiler/testData/codegen/box/traits/withRequired/kt2963.kt b/compiler/testData/codegen/box/traits/withRequired/kt2963.kt index 03b1d72120b..2d463906975 100644 --- a/compiler/testData/codegen/box/traits/withRequired/kt2963.kt +++ b/compiler/testData/codegen/box/traits/withRequired/kt2963.kt @@ -1,6 +1,6 @@ open class Base -trait Derived : Base { +interface Derived : Base { fun foo(): String { return object { fun bar() = baz(this@Derived) diff --git a/compiler/testData/codegen/box/traits/withRequired/kt3413.kt b/compiler/testData/codegen/box/traits/withRequired/kt3413.kt index 30cefd6fa2c..a27f370230f 100644 --- a/compiler/testData/codegen/box/traits/withRequired/kt3413.kt +++ b/compiler/testData/codegen/box/traits/withRequired/kt3413.kt @@ -1,4 +1,4 @@ -trait Trait> : Enum { +interface Trait> : Enum { val value : String get() = name() } diff --git a/compiler/testData/codegen/box/traits/withRequired/kt3429.kt b/compiler/testData/codegen/box/traits/withRequired/kt3429.kt index f865200c56c..18a55c90083 100644 --- a/compiler/testData/codegen/box/traits/withRequired/kt3429.kt +++ b/compiler/testData/codegen/box/traits/withRequired/kt3429.kt @@ -4,7 +4,7 @@ open class Base { } } -trait Trait: Base { +interface Trait: Base { override fun sayHello(): String { return "OK" } diff --git a/compiler/testData/codegen/box/traits/withRequired/property.kt b/compiler/testData/codegen/box/traits/withRequired/property.kt index 8aac0835791..f6945f36518 100644 --- a/compiler/testData/codegen/box/traits/withRequired/property.kt +++ b/compiler/testData/codegen/box/traits/withRequired/property.kt @@ -2,7 +2,7 @@ open class Base { var s = "Fail" } -trait Trait : Base { +interface Trait : Base { var value : String get() = s set(value) { s = value } diff --git a/compiler/testData/codegen/box/traits/withRequired/propertyViaBridge.kt b/compiler/testData/codegen/box/traits/withRequired/propertyViaBridge.kt index c07ce9735f9..96ed04b4aa6 100644 --- a/compiler/testData/codegen/box/traits/withRequired/propertyViaBridge.kt +++ b/compiler/testData/codegen/box/traits/withRequired/propertyViaBridge.kt @@ -1,6 +1,6 @@ open class Base -trait Trait : Base { +interface Trait : Base { private val value : String get() = "OK" diff --git a/compiler/testData/codegen/box/traits/withRequired/simple.kt b/compiler/testData/codegen/box/traits/withRequired/simple.kt index 580498cbb68..2a4b89e189d 100644 --- a/compiler/testData/codegen/box/traits/withRequired/simple.kt +++ b/compiler/testData/codegen/box/traits/withRequired/simple.kt @@ -1,4 +1,4 @@ -trait Trait : java.lang.Object { +interface Trait : java.lang.Object { fun foo(): String = "239 " + toString() } diff --git a/compiler/testData/codegen/box/traits/withRequired/super.kt b/compiler/testData/codegen/box/traits/withRequired/super.kt index ac4d1f89cc3..064084c26ba 100644 --- a/compiler/testData/codegen/box/traits/withRequired/super.kt +++ b/compiler/testData/codegen/box/traits/withRequired/super.kt @@ -4,7 +4,7 @@ open class Base { } } -trait Derived : Base { +interface Derived : Base { override fun foo() : String { //super.foo() return "OK" diff --git a/compiler/testData/codegen/box/traits/withRequired/superViaBridge.kt b/compiler/testData/codegen/box/traits/withRequired/superViaBridge.kt index a00ac37c3d1..7bd8a552608 100644 --- a/compiler/testData/codegen/box/traits/withRequired/superViaBridge.kt +++ b/compiler/testData/codegen/box/traits/withRequired/superViaBridge.kt @@ -3,7 +3,7 @@ open class Base { open fun foo2() { } } -trait Derived : Base { +interface Derived : Base { override fun foo() { object { fun bar() { diff --git a/compiler/testData/codegen/box/traits/withRequired/traitFuncCall.kt b/compiler/testData/codegen/box/traits/withRequired/traitFuncCall.kt index e84d7931c56..b704ceb9e2d 100644 --- a/compiler/testData/codegen/box/traits/withRequired/traitFuncCall.kt +++ b/compiler/testData/codegen/box/traits/withRequired/traitFuncCall.kt @@ -3,7 +3,7 @@ open class Foo() { } -trait T: Foo { +interface T: Foo { public fun xyzzy(): String = o() + k() public fun o(): String } diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/Delegation.kt b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/Delegation.kt index 29b0e162a71..3dc0d38d534 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/Delegation.kt +++ b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/Delegation.kt @@ -1,4 +1,4 @@ -trait Tr { +interface Tr { fun foo(): String } diff --git a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt b/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt index ccd336f24d1..9b423f9a325 100644 --- a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt +++ b/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt @@ -2,7 +2,7 @@ import fieldAccessFromExtensionInTraitImpl as D -trait T { +interface T { fun Int.foo(d: D) = d.result!! } diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt index a3ff909d1c5..f54f014b2bf 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun run(): T; } diff --git a/compiler/testData/codegen/boxInline/builders/builders.2.kt b/compiler/testData/codegen/boxInline/builders/builders.2.kt index f2c29052b97..cb4bc6eac25 100644 --- a/compiler/testData/codegen/boxInline/builders/builders.2.kt +++ b/compiler/testData/codegen/boxInline/builders/builders.2.kt @@ -3,7 +3,7 @@ package builders import java.util.ArrayList import java.util.HashMap -trait Element { +interface Element { fun render(builder: StringBuilder, indent: String) override fun toString(): String { diff --git a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt index c19b0284c3b..2fc26f262e8 100644 --- a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt +++ b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt @@ -3,7 +3,7 @@ package builders import java.util.ArrayList import java.util.HashMap -trait Element { +interface Element { fun render(builder: StringBuilder, indent: String) override fun toString(): String { diff --git a/compiler/testData/codegen/boxInline/complex/use.2.kt b/compiler/testData/codegen/boxInline/complex/use.2.kt index 0c74af1e7b2..c2a6ac78683 100644 --- a/compiler/testData/codegen/boxInline/complex/use.2.kt +++ b/compiler/testData/codegen/boxInline/complex/use.2.kt @@ -9,7 +9,7 @@ public class Output(val d: Data) : Closeable { public fun doOutput(data: Int): Int = data } -public open trait Closeable { +public open interface Closeable { open public fun close() {} } diff --git a/compiler/testData/codegen/boxInline/complex/with.2.kt b/compiler/testData/codegen/boxInline/complex/with.2.kt index 0684df6c177..a4ac07cfd41 100644 --- a/compiler/testData/codegen/boxInline/complex/with.2.kt +++ b/compiler/testData/codegen/boxInline/complex/with.2.kt @@ -11,7 +11,7 @@ public class Output(val d: Data) : Closeable { public fun doOutput(data: Int): Int = data } -public open trait Closeable { +public open interface Closeable { open public fun close() {} } diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt index 8e0745401c9..436c9974338 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt @@ -1,6 +1,6 @@ package test -public trait MCloseable { +public interface MCloseable { public open fun close() } diff --git a/compiler/testData/codegen/boxInline/trait/trait.2.kt b/compiler/testData/codegen/boxInline/trait/trait.2.kt index d7a9b4e33c1..ed56b295051 100644 --- a/compiler/testData/codegen/boxInline/trait/trait.2.kt +++ b/compiler/testData/codegen/boxInline/trait/trait.2.kt @@ -1,6 +1,6 @@ package test -trait InlineTrait { +interface InlineTrait { inline final fun finalInline(s: () -> String): String { return s() diff --git a/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/substitutedIterable.kt b/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/substitutedIterable.kt index f1812b3e4f7..0a6c159ccb2 100644 --- a/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/substitutedIterable.kt +++ b/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/substitutedIterable.kt @@ -1,4 +1,4 @@ -trait MyIterable : Iterable +interface MyIterable : Iterable class E : RuntimeException() fun foo(): MyIterable = throw E() diff --git a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/Test.java b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/Test.java index eef03d83106..28cf20463a5 100644 --- a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/Test.java +++ b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/Test.java @@ -6,7 +6,7 @@ class Test { if (!s.equals("Klass")) throw new AssertionError("Fail class: " + s); s = Trait.NAME; - if (!s.equals("Trait")) throw new AssertionError("Fail trait: " + s); + if (!s.equals("Trait")) throw new AssertionError("Fail interface: " + s); s = Enoom.NAME; if (!s.equals("Enoom")) throw new AssertionError("Fail enum: " + s); diff --git a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt index 00c287d105d..395e96670e0 100644 --- a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt +++ b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt @@ -4,7 +4,7 @@ class Klass { } } -trait Trait { +interface Trait { companion object { val NAME = "Trait" } diff --git a/compiler/testData/codegen/boxWithJava/trait/interfaceInheritance.kt b/compiler/testData/codegen/boxWithJava/trait/interfaceInheritance.kt index 7e1dd4e1527..bceff8b3b05 100644 --- a/compiler/testData/codegen/boxWithJava/trait/interfaceInheritance.kt +++ b/compiler/testData/codegen/boxWithJava/trait/interfaceInheritance.kt @@ -1,4 +1,4 @@ -trait A : MyInt { +interface A : MyInt { override public fun test(): String? { return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/arrays/stdlib.kt b/compiler/testData/codegen/boxWithStdlib/arrays/stdlib.kt index 58b5bcbb584..e7ff20e0b62 100644 --- a/compiler/testData/codegen/boxWithStdlib/arrays/stdlib.kt +++ b/compiler/testData/codegen/boxWithStdlib/arrays/stdlib.kt @@ -1,8 +1,8 @@ -trait ISized { +interface ISized { val size : Int } -trait javaUtilIterator : Iterator { +interface javaUtilIterator : Iterator { fun remove() : Unit { throw UnsupportedOperationException() } @@ -16,13 +16,13 @@ class MyIterator(val array : ReadOnlyArray) : javaUtilIterator { override fun next() : T = array.get(index++) } -trait ReadOnlyArray : ISized, Iterable { +interface ReadOnlyArray : ISized, Iterable { fun get(index : Int) : T override fun iterator() : Iterator = MyIterator(this) } -trait WriteOnlyArray : ISized { +interface WriteOnlyArray : ISized { fun set(index : Int, value : T) : Unit fun set(from: Int, count: Int, value: T) { diff --git a/compiler/testData/codegen/boxWithStdlib/callableReference/function/local/enumExtendsTrait.kt b/compiler/testData/codegen/boxWithStdlib/callableReference/function/local/enumExtendsTrait.kt index 36954fb8250..5b28434e19c 100644 --- a/compiler/testData/codegen/boxWithStdlib/callableReference/function/local/enumExtendsTrait.kt +++ b/compiler/testData/codegen/boxWithStdlib/callableReference/function/local/enumExtendsTrait.kt @@ -1,4 +1,4 @@ -trait Named { +interface Named { fun name(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitImplMethodWithClassReceiver.kt b/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitImplMethodWithClassReceiver.kt index 27f8a407fb9..b47561d9d03 100644 --- a/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitImplMethodWithClassReceiver.kt +++ b/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitImplMethodWithClassReceiver.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun foo() = "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitMember.kt b/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitMember.kt index 8b278fb0ebb..619220ff65f 100644 --- a/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitMember.kt +++ b/compiler/testData/codegen/boxWithStdlib/callableReference/function/traitMember.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/dataClasses/tostring/alreadyInherited.kt b/compiler/testData/codegen/boxWithStdlib/dataClasses/tostring/alreadyInherited.kt index b91111255d8..52cefe0fa66 100644 --- a/compiler/testData/codegen/boxWithStdlib/dataClasses/tostring/alreadyInherited.kt +++ b/compiler/testData/codegen/boxWithStdlib/dataClasses/tostring/alreadyInherited.kt @@ -1,4 +1,4 @@ -trait SuperTrait { +interface SuperTrait { override fun toString(): String = "!" } diff --git a/compiler/testData/codegen/boxWithStdlib/fullJdk/regressions/kt1202.kt b/compiler/testData/codegen/boxWithStdlib/fullJdk/regressions/kt1202.kt index deaa57f525c..b95c0cb3fd9 100644 --- a/compiler/testData/codegen/boxWithStdlib/fullJdk/regressions/kt1202.kt +++ b/compiler/testData/codegen/boxWithStdlib/fullJdk/regressions/kt1202.kt @@ -2,7 +2,7 @@ package testeval import java.util.* -trait Expression +interface Expression class Num(val value : Int) : Expression class Sum(val left : Expression, val right : Expression) : Expression class Mult(val left : Expression, val right : Expression) : Expression @@ -16,7 +16,7 @@ fun eval(e : Expression) : Int { } } -trait ParseResult { +interface ParseResult { val success : Boolean val value : T } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt index 6744ff747e3..a1d3c1b512b 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun f(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6368.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6368.kt index 92ed2f45efe..16d226f3c0d 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6368.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6368.kt @@ -1,7 +1,7 @@ import kotlin.properties.Delegates import java.util.HashMap -trait R { +interface R { fun result(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectExpression.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectExpression.kt index dc13bfe9571..0e04ffaa04b 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectExpression.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectExpression.kt @@ -1,4 +1,4 @@ -trait C { +interface C { val a: Any } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt index 4be92ec9f51..c1a8e0d47f4 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt @@ -4,7 +4,7 @@ class G(val s: T) { } -public trait ErrorsJvmTrait { +public interface ErrorsJvmTrait { companion object { public val param : G = G("STRING") } diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/Kt1149.kt b/compiler/testData/codegen/boxWithStdlib/regressions/Kt1149.kt index 1abb4b7ec6f..7738799710e 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/Kt1149.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/Kt1149.kt @@ -3,7 +3,7 @@ package test.regressions.kt1149 import java.util.ArrayList import kotlin.util.* -public trait SomeTrait { +public interface SomeTrait { fun foo() } diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/kt4142.kt b/compiler/testData/codegen/boxWithStdlib/regressions/kt4142.kt index e02b05f37bb..d7fe122fda7 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/kt4142.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/kt4142.kt @@ -3,7 +3,7 @@ open class B { get() = "OK" } -trait A { +interface A { val name: String } diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/objectCaptureOuterConstructorProperty.kt b/compiler/testData/codegen/boxWithStdlib/regressions/objectCaptureOuterConstructorProperty.kt index c25d8948d60..dd3315896ec 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/objectCaptureOuterConstructorProperty.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/objectCaptureOuterConstructorProperty.kt @@ -1,6 +1,6 @@ import kotlin.support.* -trait Stream { +interface Stream { fun iterator(): Iterator } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/anonymousObjectNoPropagate.kt b/compiler/testData/codegen/boxWithStdlib/reified/anonymousObjectNoPropagate.kt index b405666b768..b9ff3a1cd9a 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/anonymousObjectNoPropagate.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/anonymousObjectNoPropagate.kt @@ -1,6 +1,6 @@ import kotlin.test.assertEquals -trait A { +interface A { fun f1(): String fun f2(): String fun f3(): String diff --git a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObject.kt b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObject.kt index 339a09dd4a4..610af457377 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObject.kt @@ -2,7 +2,7 @@ import kotlin.test.assertEquals fun foo(block: () -> String) = block() -trait A { +interface A { fun f(): String fun g(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObjectWithinReified.kt b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObjectWithinReified.kt index 94335af2b62..0796b64399e 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObjectWithinReified.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineFunOfObjectWithinReified.kt @@ -6,7 +6,7 @@ inline fun className(): String = javaClass().getName() inline fun lambdaShouldBeReified(): String = foo { className() } -trait A { +interface A { fun f(): String fun g(): String } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineIntoNonInlineableLambda.kt b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineIntoNonInlineableLambda.kt index ce25ba54f75..542b658441a 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineIntoNonInlineableLambda.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/reifiedInlineIntoNonInlineableLambda.kt @@ -4,7 +4,7 @@ fun foo(block: () -> String) = block() inline fun className(): String = javaClass().getName() -trait A { +interface A { fun f(): String fun g(): String } diff --git a/compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt b/compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt index 1b9a31ed573..2f481c74fc3 100644 --- a/compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt +++ b/compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(): Any } diff --git a/compiler/testData/codegen/bytecodeText/traitImplGeneratedOnce.kt b/compiler/testData/codegen/bytecodeText/traitImplGeneratedOnce.kt index 51ce275d99e..234a276c49d 100644 --- a/compiler/testData/codegen/bytecodeText/traitImplGeneratedOnce.kt +++ b/compiler/testData/codegen/bytecodeText/traitImplGeneratedOnce.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo() = 42 } diff --git a/compiler/testData/codegen/classes/delegationToVal.kt b/compiler/testData/codegen/classes/delegationToVal.kt index ec6242f5d16..0a4558ae4b7 100644 --- a/compiler/testData/codegen/classes/delegationToVal.kt +++ b/compiler/testData/codegen/classes/delegationToVal.kt @@ -1,4 +1,4 @@ -trait IActing { +interface IActing { fun act(): String } diff --git a/compiler/testData/codegen/innerClassInfo/innerAccessFlags.kt b/compiler/testData/codegen/innerClassInfo/innerAccessFlags.kt index b902284e2b8..a96744e9995 100644 --- a/compiler/testData/codegen/innerClassInfo/innerAccessFlags.kt +++ b/compiler/testData/codegen/innerClassInfo/innerAccessFlags.kt @@ -2,7 +2,7 @@ class A { // Kind annotation class Annotation enum class Enum - trait Trait + interface Trait // Modality open class OpenStaticClass diff --git a/compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/defaultMethodCallViaTrait.kt b/compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/defaultMethodCallViaTrait.kt index 77c2a40cf45..e7ba10889c2 100644 --- a/compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/defaultMethodCallViaTrait.kt +++ b/compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/defaultMethodCallViaTrait.kt @@ -1,4 +1,4 @@ -trait TestTrait : Simple {} +interface TestTrait : Simple {} class Test : TestTrait {} fun box(): String { diff --git a/compiler/testData/codegen/notNullAssertions/AssertionChecker.kt b/compiler/testData/codegen/notNullAssertions/AssertionChecker.kt index 40eb76742af..d3643218d1d 100644 --- a/compiler/testData/codegen/notNullAssertions/AssertionChecker.kt +++ b/compiler/testData/codegen/notNullAssertions/AssertionChecker.kt @@ -11,7 +11,7 @@ class AssertionChecker(val illegalStateExpected: Boolean) { } -trait Tr { +interface Tr { fun foo(): String } diff --git a/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt b/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt index 4baa7786d3b..7f11e0e4012 100644 --- a/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt +++ b/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt @@ -2,6 +2,6 @@ import java.lang.annotation.* Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String) -trait T { +interface T { [SomeAnnotation("OK")] val property: Int } diff --git a/compiler/testData/codegen/regressions/kt297.kt b/compiler/testData/codegen/regressions/kt297.kt index 0a6ad8f82a5..169d061c6de 100644 --- a/compiler/testData/codegen/regressions/kt297.kt +++ b/compiler/testData/codegen/regressions/kt297.kt @@ -1,4 +1,4 @@ -// KT-297 Overload resolution ambiguity with required in trait -trait ALE : java.util.ArrayList { +// KT-297 Overload resolution ambiguity with required in interface +interface ALE : java.util.ArrayList { fun getOrValue(index: Int, value : T) : T = if(index >= 0 && index < size()) get(index) else value } \ No newline at end of file diff --git a/compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt b/compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt index 81c402f355b..880b3c9ad0f 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt @@ -1,6 +1,6 @@ package test -trait Trait { +interface Trait { fun foo() val bar: Int } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt b/compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt index 8f12a0bf590..14d5affe430 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt @@ -1,6 +1,6 @@ package test -trait Trait { +interface Trait { fun simple() { } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt index 230e0d16013..ca45627f88a 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt index 918943a1ab1..db977673289 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt index 3bba95749b3..9e76fbf5f05 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt index 795637eaa7b..edb53697a90 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): Any } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt index f2f8226a9bc..d05e0c28918 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt index 227271d3d74..4825976da81 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt @@ -1,6 +1,6 @@ package test -trait A> { +interface A> { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt index 69d6c4796a4..4e59e10e679 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt index 185be0adc22..97b8a7540f1 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt index 825917181d6..404576a1c11 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt @@ -1,10 +1,10 @@ package test -trait A { +interface A { fun foo(): T } -trait B : A +interface B : A abstract class C : B diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt index 816a6c0b288..642fdaf23df 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt index d1e5e86a8ef..8438becf723 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo(): T } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt index 6d11ab9149d..9399efe1aa5 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt @@ -3,7 +3,7 @@ package test class E1: Exception() class E2: Exception() -trait Trait { +interface Trait { throws() fun none() diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt index 27154abdc6e..befd95233be 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt @@ -2,7 +2,7 @@ package test class E1: Exception() -trait Base { +interface Base { throws(E1::class) fun one(t: T) {} } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt index 58f97b762dc..cb242d3c5c7 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt @@ -3,7 +3,7 @@ package test class E1: Exception() class E2: Exception() -trait Trait { +interface Trait { throws() fun none() {} diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt index 9c0944a7948..06aed71a05a 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt @@ -8,7 +8,7 @@ annotation class ALong(val value: Long) annotation class ADouble(val value: Double) annotation class AFloat(val value: Float) -trait Test { +interface Test { companion object { val vstring: String = "Test" diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt index 9d8b9a15fbe..b1958bb1156 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt @@ -1,6 +1,6 @@ package test -trait Test { +interface Test { companion object { public val valProp: Int = 10 diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/noWarningsOnJavaKotlinInheritance/noWarningsOnJavaKotlinInheritance.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/noWarningsOnJavaKotlinInheritance/noWarningsOnJavaKotlinInheritance.kt index 11f0f17de03..bc617c7f74c 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/noWarningsOnJavaKotlinInheritance/noWarningsOnJavaKotlinInheritance.kt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/noWarningsOnJavaKotlinInheritance/noWarningsOnJavaKotlinInheritance.kt @@ -7,7 +7,7 @@ class SimpleSubclass : JavaInterface { // Class extends both Java and Kotlin traits. Checks that there's no DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES warning -trait KotlinTrait { +interface KotlinTrait { public fun foo(someOtherName: Int) {} } diff --git a/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt b/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt index dc872ab7fd2..a04ee6dda50 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt @@ -5,7 +5,7 @@ import java.lang.annotation.* Retention(RetentionPolicy.RUNTIME) annotation class Ann -trait Tr { +interface Tr { Ann fun foo() {} } \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt b/compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt index 3c7973fdbdc..15e0b1766fb 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt @@ -1,9 +1,9 @@ package a -trait Rec> { +interface Rec> { fun t(): T } -trait Super { +interface Super { fun foo(p: Rec<*, *>) = p.t() } \ No newline at end of file diff --git a/compiler/testData/constraintSystem/declarations/declarations.kt b/compiler/testData/constraintSystem/declarations/declarations.kt index d4dc77f5df6..832e99dd7f9 100644 --- a/compiler/testData/constraintSystem/declarations/declarations.kt +++ b/compiler/testData/constraintSystem/declarations/declarations.kt @@ -1,10 +1,10 @@ fun foo() = 42 -trait A -trait B : A -trait C : B +interface A +interface B : A +interface C : B -trait Consumer -trait Producer +interface Consumer +interface Producer -trait My \ No newline at end of file +interface My \ No newline at end of file diff --git a/compiler/testData/diagnostics/checkerTestUtil/test_with_diagnostic.kt b/compiler/testData/diagnostics/checkerTestUtil/test_with_diagnostic.kt index 781f16efae5..5842af1f97d 100644 --- a/compiler/testData/diagnostics/checkerTestUtil/test_with_diagnostic.kt +++ b/compiler/testData/diagnostics/checkerTestUtil/test_with_diagnostic.kt @@ -1,4 +1,4 @@ -trait Pa +interface Pa fun foo(u : Unit) : Int = 1 fun bas(u : Pa) = 3 diff --git a/compiler/testData/diagnostics/tests/AbstractInTrait.kt b/compiler/testData/diagnostics/tests/AbstractInTrait.kt index 777898b1f12..dca6ca1344e 100644 --- a/compiler/testData/diagnostics/tests/AbstractInTrait.kt +++ b/compiler/testData/diagnostics/tests/AbstractInTrait.kt @@ -1,6 +1,6 @@ package abstract -trait MyTrait { +interface MyTrait { //properties val a: Int val a1: Int = 1 diff --git a/compiler/testData/diagnostics/tests/AnonymousInitializers.kt b/compiler/testData/diagnostics/tests/AnonymousInitializers.kt index 69df0631f6b..c139a55789f 100644 --- a/compiler/testData/diagnostics/tests/AnonymousInitializers.kt +++ b/compiler/testData/diagnostics/tests/AnonymousInitializers.kt @@ -1,4 +1,4 @@ -trait NoC { +interface NoC { init { } diff --git a/compiler/testData/diagnostics/tests/Builders.kt b/compiler/testData/diagnostics/tests/Builders.kt index d2a0fa788b6..2f334cd72d5 100644 --- a/compiler/testData/diagnostics/tests/Builders.kt +++ b/compiler/testData/diagnostics/tests/Builders.kt @@ -49,7 +49,7 @@ fun main(args : Array) { println(result) } -trait Element { +interface Element { fun render(builder : StringBuilder, indent : String) override fun toString() : String { diff --git a/compiler/testData/diagnostics/tests/CovariantOverrideType.kt b/compiler/testData/diagnostics/tests/CovariantOverrideType.kt index 94e0624b2f4..b3cfc4ff9be 100644 --- a/compiler/testData/diagnostics/tests/CovariantOverrideType.kt +++ b/compiler/testData/diagnostics/tests/CovariantOverrideType.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo() : Int = 1 fun foo2() : Int = 1 fun foo1() : Int = 1 diff --git a/compiler/testData/diagnostics/tests/DeferredTypes.kt b/compiler/testData/diagnostics/tests/DeferredTypes.kt index 01524cefbfd..107a25ea17b 100644 --- a/compiler/testData/diagnostics/tests/DeferredTypes.kt +++ b/compiler/testData/diagnostics/tests/DeferredTypes.kt @@ -1,3 +1,3 @@ -trait T { +interface T { val a = Foo.bar() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/DiamondFunction.kt b/compiler/testData/diagnostics/tests/DiamondFunction.kt index 9e171ba1dc1..0d8b9a77755 100644 --- a/compiler/testData/diagnostics/tests/DiamondFunction.kt +++ b/compiler/testData/diagnostics/tests/DiamondFunction.kt @@ -1,9 +1,9 @@ -trait Base { +interface Base { fun f() = 1 } open class Left() : Base -trait Right : Base +interface Right : Base class Diamond() : Left(), Right diff --git a/compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt b/compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt index 3fe4f3a0c26..d84e34a40a8 100644 --- a/compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt +++ b/compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt @@ -1,9 +1,9 @@ -trait Base

{ +interface Base

{ fun f() = 1 } open class Left

() : Base

-trait Right

: Base

+interface Right

: Base

class Diamond

() : Left

(), Right

diff --git a/compiler/testData/diagnostics/tests/DiamondProperty.kt b/compiler/testData/diagnostics/tests/DiamondProperty.kt index fcc8bc39372..5a93ad88daa 100644 --- a/compiler/testData/diagnostics/tests/DiamondProperty.kt +++ b/compiler/testData/diagnostics/tests/DiamondProperty.kt @@ -1,4 +1,4 @@ -trait Base { +interface Base { var v : Int get() = 1 set(v) {} @@ -6,6 +6,6 @@ trait Base { open class Left() : Base -trait Right : Base +interface Right : Base class Diamond() : Left(), Right diff --git a/compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt b/compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt index d95b35b7eec..29bb7ee8614 100644 --- a/compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt +++ b/compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt @@ -1,43 +1,43 @@ // FILE: b.kt -trait A {} -trait B : A {} -trait C : B, A {} -trait C1 : B, A {} -trait D : C, B{} +interface A {} +interface B : A {} +interface C : B, A {} +interface C1 : B, A {} +interface D : C, B{} -trait A1 {} -trait B1 : A1 {} -trait B2 : A1, B1 {} +interface A1 {} +interface B1 : A1 {} +interface B2 : A1, B1 {} -trait BA1 {} -trait BB1 : BA1 {} -trait BB2 : BA1, BB1 {} +interface BA1 {} +interface BB1 : BA1 {} +interface BB2 : BA1, BB1 {} // FILE: b.kt package x - trait AA1 {} - trait AB1 : AA1 {} - trait AB3 : AA1> {} - trait AB2 : AA1, AB1, AB3 {} + interface AA1 {} + interface AB1 : AA1 {} + interface AB3 : AA1> {} + interface AB2 : AA1, AB1, AB3 {} // FILE: b.kt package x2 - trait AA1 {} - trait AB1 : AA1 {} - trait AB3 : AA1> {} - trait AB2 : AA1, AB1, AB3 {} + interface AA1 {} + interface AB1 : AA1 {} + interface AB3 : AA1> {} + interface AB2 : AA1, AB1, AB3 {} // FILE: b.kt package x3 - trait AA1 {} - trait AB1 : AA1 {} - trait AB3 : AA1> {} - trait AB2 : AA1, AB1, AB3 {} + interface AA1 {} + interface AB1 : AA1 {} + interface AB3 : AA1> {} + interface AB2 : AA1, AB1, AB3 {} // FILE: b.kt package sx2 - trait AA1 {} - trait AB1 : AA1 {} - trait AB3 : AA1> {} - trait AB2 : AA1, AB1, AB3 {} \ No newline at end of file + interface AA1 {} + interface AB1 : AA1 {} + interface AB3 : AA1> {} + interface AB2 : AA1, AB1, AB3 {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/MultipleBounds.kt b/compiler/testData/diagnostics/tests/MultipleBounds.kt index 0fcd73ad2fe..243940985b5 100644 --- a/compiler/testData/diagnostics/tests/MultipleBounds.kt +++ b/compiler/testData/diagnostics/tests/MultipleBounds.kt @@ -4,11 +4,11 @@ open class A() { fun foo() : Int = 1 } -trait B { +interface B { fun bar() : Double = 1.0; } -trait G { +interface G { val boo: Double where X : B val bal: Double where A : B val bas: Double where X : B diff --git a/compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt b/compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt index 297eb3aefff..95d4fdcc9c8 100644 --- a/compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt +++ b/compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt @@ -1,5 +1,5 @@ -trait Aaa { +interface Aaa { fun zzz(value: T): Unit } diff --git a/compiler/testData/diagnostics/tests/OverridingVarByVal.kt b/compiler/testData/diagnostics/tests/OverridingVarByVal.kt index e14eef6b41e..c18a525c9e6 100644 --- a/compiler/testData/diagnostics/tests/OverridingVarByVal.kt +++ b/compiler/testData/diagnostics/tests/OverridingVarByVal.kt @@ -2,7 +2,7 @@ open class Var() { open var v : Int = 1 } -trait VarT { +interface VarT { var v : Int } diff --git a/compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt b/compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt index 03b68107997..2a428d0261d 100644 --- a/compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt +++ b/compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt @@ -1,6 +1,6 @@ -trait A {} -trait B {} -trait C {} -trait D {} +interface A {} +interface B {} +interface C {} +interface D {} -trait Test : A<in Int>, B<out Int>, C<*>???, D {} \ No newline at end of file +interface Test : A<in Int>, B<out Int>, C<*>???, D {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/SelfTypesUnsupported.kt b/compiler/testData/diagnostics/tests/SelfTypesUnsupported.kt index 43c2f651488..e137d8399ec 100644 --- a/compiler/testData/diagnostics/tests/SelfTypesUnsupported.kt +++ b/compiler/testData/diagnostics/tests/SelfTypesUnsupported.kt @@ -2,7 +2,7 @@ fun foo(f: This) {} -trait CThis>> { +interface CThis>> { val x: This val y: This? } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/SupertypeListChecks.kt b/compiler/testData/diagnostics/tests/SupertypeListChecks.kt index 3ef95fb2b33..fc282ff139c 100644 --- a/compiler/testData/diagnostics/tests/SupertypeListChecks.kt +++ b/compiler/testData/diagnostics/tests/SupertypeListChecks.kt @@ -4,7 +4,7 @@ In a supertype list: Same type should not be mentioned twice Same type should not be indirectly mentioned with incoherent type arguments - Every trait's required dependencies should be satisfied + Every interface's required dependencies should be satisfied No final types should appear Only one class is allowed */ @@ -17,24 +17,24 @@ open class C2 {} open class C3 {} -trait T1 {} +interface T1 {} -trait T2 {} +interface T2 {} -trait Test() { +interface Test() { } -trait Test1 : C2() {} +interface Test1 : C2() {} -trait Test2 : C2 {} +interface Test2 : C2 {} -trait Test3 : C2, C3 {} +interface Test3 : C2, C3 {} -trait Test4 : T1 {} +interface Test4 : T1 {} -trait Test5 : T1, T1 {} +interface Test5 : T1, T1 {} -trait Test6 : C1 {} +interface Test6 : C1 {} class CTest1() : OC1() {} diff --git a/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt b/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt index 7361b31d2d3..d49911c5101 100644 --- a/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt +++ b/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt @@ -1,4 +1,4 @@ -trait MyTrait: Object { +interface MyTrait: Object { override fun toString(): String public override fun finalize() public override fun wait() diff --git a/compiler/testData/diagnostics/tests/TraitWithConstructor.kt b/compiler/testData/diagnostics/tests/TraitWithConstructor.kt index 325d5b83e9e..92374c88b6a 100644 --- a/compiler/testData/diagnostics/tests/TraitWithConstructor.kt +++ b/compiler/testData/diagnostics/tests/TraitWithConstructor.kt @@ -1,12 +1,12 @@ class C(val a: String) {} -trait T1(val x: String) {} +interface T1(val x: String) {} -trait T2() {} +interface T2() {} -trait T3(a: Int) {} +interface T3(a: Int) {} -trait T4 { +interface T4 { constructor(a: Int) { val b: Int = 1 } diff --git a/compiler/testData/diagnostics/tests/UnusedVariables.kt b/compiler/testData/diagnostics/tests/UnusedVariables.kt index 7ad929ffd38..e8106fe91b7 100644 --- a/compiler/testData/diagnostics/tests/UnusedVariables.kt +++ b/compiler/testData/diagnostics/tests/UnusedVariables.kt @@ -112,7 +112,7 @@ fun testFunctionLiterals() { } } -trait Trait { +interface Trait { fun foo() } diff --git a/compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt b/compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt index 62870d6b0ab..4fc4167de8a 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt @@ -1,6 +1,6 @@ val a = object: T {} open class C -trait T +interface T annotation class Ann: C() annotation class Ann2: T diff --git a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt index 35d4889f7a9..8c5e211eead 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt @@ -6,7 +6,7 @@ class A { annotation object O {} -annotation trait T {} +annotation interface T {} annotation fun f() = 0 diff --git a/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.kt b/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.kt index 488f8e505c0..b3a9d8eda97 100644 --- a/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.kt +++ b/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.kt @@ -28,7 +28,7 @@ fun bar2(): Array = null!! val y: Array<[Ann] String?> = arrayOfNulls(1) val block: ([Ann] x: [Ann] String) -> [Ann] String = { "" } -trait B -trait D : [Ann] B +interface B +interface D : [Ann] B Ann([Ann] 1) class MyClass diff --git a/compiler/testData/diagnostics/tests/annotations/onInitializer.kt b/compiler/testData/diagnostics/tests/annotations/onInitializer.kt index 0cf9234c4e7..94e69bbf308 100644 --- a/compiler/testData/diagnostics/tests/annotations/onInitializer.kt +++ b/compiler/testData/diagnostics/tests/annotations/onInitializer.kt @@ -5,7 +5,7 @@ class A { @aaa init {} } -trait T { +interface T { ann init {} @ann init {} aaa init {} diff --git a/compiler/testData/diagnostics/tests/cast/DowncastMap.kt b/compiler/testData/diagnostics/tests/cast/DowncastMap.kt index 02a4fcc04ca..7bf0df122ee 100644 --- a/compiler/testData/diagnostics/tests/cast/DowncastMap.kt +++ b/compiler/testData/diagnostics/tests/cast/DowncastMap.kt @@ -1,5 +1,5 @@ -trait Map -trait MutableMap: Map { +interface Map +interface MutableMap: Map { fun set(k: K, v: V) } diff --git a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt b/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt index 81074b9ac86..296ae7582aa 100644 --- a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt +++ b/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt @@ -1,9 +1,9 @@ -trait A -trait B: A -trait D +interface A +interface B: A +interface D -trait BaseSuper -trait BaseImpl: BaseSuper -trait DerivedSuper: BaseSuper, BaseImpl +interface BaseSuper +interface BaseImpl: BaseSuper +interface DerivedSuper: BaseSuper, BaseImpl fun test(t: BaseSuper) = t is DerivedSuper \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt b/compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt index be45dbe7036..a82c71eafef 100644 --- a/compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt +++ b/compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt @@ -1,6 +1,6 @@ -trait A -trait B: A +interface A +interface B: A -trait Base +interface Base fun test(a: Base) where T: Base = a is T \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt b/compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt index 97387f2bdef..a27a5165198 100644 --- a/compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt +++ b/compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt @@ -1,3 +1,3 @@ -trait A -trait B +interface A +interface B fun testing(a: A) = a as B diff --git a/compiler/testData/diagnostics/tests/cast/IsTraits.kt b/compiler/testData/diagnostics/tests/cast/IsTraits.kt index 99656c2ab24..defcbfb3bc9 100644 --- a/compiler/testData/diagnostics/tests/cast/IsTraits.kt +++ b/compiler/testData/diagnostics/tests/cast/IsTraits.kt @@ -1,4 +1,4 @@ -trait Aaa -trait Bbb +interface Aaa +interface Bbb fun f(a: Aaa) = a is Bbb diff --git a/compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt b/compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt index c7f76721598..9f04ed15dbb 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt @@ -1,5 +1,5 @@ -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr): Any { return tr as G<G> diff --git a/compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt b/compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt index 87602183923..48f5318520a 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G : Tr +interface Tr +interface G : Tr fun test(tr: Tr) { val v = tr as G? diff --git a/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt b/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt index 9069dbbbe10..ff5111e66af 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr) { val v = tr as G? diff --git a/compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt b/compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt index 4aa276049bd..d3c22b7fa60 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait Either -trait Left: Either -trait Right: Either +interface Either +interface Left: Either +interface Right: Either class C1(val v1: Int) class C2(val v2: Int) diff --git a/compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt b/compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt index fd19005bde2..29725127b34 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt @@ -1,9 +1,9 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST -trait Either -trait Left: Either { +interface Either +interface Left: Either { val value: A } -trait Right: Either { +interface Right: Either { val value: B } diff --git a/compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt b/compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt index fd623e2a19e..a07e46eb9c3 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt @@ -1,9 +1,9 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST -trait Either -trait Left: Either { +interface Either +interface Left: Either { val value: A } -trait Right: Either { +interface Right: Either { val value: B } diff --git a/compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt b/compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt index 3d018404418..ff8660f2698 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait Either -trait Left: Either -trait Right: Either +interface Either +interface Left: Either +interface Right: Either class C1(val v1: Int) class C2(val v2: Int) diff --git a/compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt b/compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt index 61f862dbc1b..ca683c6efda 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt @@ -1,9 +1,9 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST -trait Either -trait Left: Either { +interface Either +interface Left: Either { val value: A } -trait Right: Either { +interface Right: Either { val value: B } diff --git a/compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt b/compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt index 7ab2e12040e..043002d60f2 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait B -trait G: B +interface B +interface G: B fun f(p: B<Foo>): Any { val v = p as G diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt index 6b629938e4b..85d624a9139 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G : Tr +interface Tr +interface G : Tr fun test(tr: Tr?) { val v = tr as G diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt index 97245e159ee..a2bd99fae2f 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr?) { val v = tr as G diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt index fad623e937b..3914084b7cb 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G : Tr +interface Tr +interface G : Tr fun test(tr: Tr?) { val v = tr as G? diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt index e144b0b6e0d..01797878cb2 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr?) { val v = tr as G? diff --git a/compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt b/compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt index 77933e0545a..4e526bada9b 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt @@ -1,4 +1,4 @@ -trait B +interface B class G: B fun f(b: B?) = b is G?? \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt index 540732d157f..4fee2d2b298 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr) { val v = tr as G diff --git a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt index de85372d101..06abe2bc01c 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt @@ -1,6 +1,6 @@ // !CHECK_TYPE -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr) = checkSubtype<G>(tr) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt index bf51d82c30c..a9b9a061eb8 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt @@ -1,4 +1,4 @@ -trait Tr -trait G +interface Tr +interface G fun test(tr: Tr) = tr is G \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt b/compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt index 4c93d96d241..f53785c40c6 100644 --- a/compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt +++ b/compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt @@ -1,4 +1,4 @@ class G -trait Tr +interface Tr fun f(q: Tr) = q is G<*> \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt b/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt index f1f4577abcf..83a09248321 100644 --- a/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt +++ b/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt @@ -1,12 +1,12 @@ // !DIAGNOSTICS: -WARNING +CAST_NEVER_SUCCEEDS -trait T1 -trait T2 -trait T3 +interface T1 +interface T2 +interface T3 open class OC1: T1 open class OC2: OC1(), T2 class FC1: OC2(), T3 -trait T4: OC1 -trait T5: T2 +interface T4: OC1 +interface T5: T2 fun test( t2: T2, diff --git a/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt b/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt index 897080f40ea..6c84314fb27 100644 --- a/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt +++ b/compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -WARNING +CAST_NEVER_SUCCEEDS -trait Trait1 -trait Trait2 +interface Trait1 +interface Trait2 open class OClass1 open class OClass2 class FClass1 diff --git a/compiler/testData/diagnostics/tests/checkType.kt b/compiler/testData/diagnostics/tests/checkType.kt index fb9ef7ae1e6..7b01f120491 100644 --- a/compiler/testData/diagnostics/tests/checkType.kt +++ b/compiler/testData/diagnostics/tests/checkType.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait A -trait B : A -trait C : B +interface A +interface B : A +interface C : B fun test(b: B) { b checkType { _() } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt index 04f9bff6ade..16948d1b94c 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt @@ -1,4 +1,4 @@ -trait X { +interface X { fun f(): Boolean } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt index 284a07bffc3..40c2f3f5871 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt @@ -2,9 +2,9 @@ // KT-4034 An expression of type Nothing may not affect 'definite return' analysis -trait JavaClassifierType -trait TypeUsage -trait JetType +interface JavaClassifierType +interface TypeUsage +interface JetType private fun transformClassifierType(classifierType: JavaClassifierType, howThisTypeIsUsed: TypeUsage): JetType? { null!! diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt index 9f6f690387b..b4fef753131 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt @@ -1,7 +1,7 @@ //KT-1191 Wrong detection of unused parameters package kt1191 -trait FunctionalList { +interface FunctionalList { val size: Int val head: T val tail: FunctionalList diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt index a846732a18d..f326ec0a926 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt @@ -1,7 +1,7 @@ //KT-2226 Parameter used as delegation by object marked as unused package a -trait A { +interface A { fun foo() : Int } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt index 9d3dfc994d6..a72db64ced4 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt @@ -3,7 +3,7 @@ fun box() { } } -trait X { +interface X { fun f(): Boolean } diff --git a/compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt b/compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt index 7e959f31192..b6c4f6021ac 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt @@ -16,7 +16,7 @@ fun fn(t1: T, t2: T?) { y.hashCode() } -trait Tr { +interface Tr { fun foo() } diff --git a/compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt b/compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt index 318d67fd867..1069f78978e 100644 --- a/compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt +++ b/compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt @@ -1,13 +1,13 @@ -trait A { +interface A { fun foo() {} } -trait B : A, E {} -trait C : B {} -trait D : B {} -trait E : F {} -trait F : D, C {} -trait G : F {} -trait H : F {} +interface B : A, E {} +interface C : B {} +interface D : B {} +interface E : F {} +interface F : D, C {} +interface G : F {} +interface H : F {} val a : A? = null val b : B? = null diff --git a/compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt b/compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt index de8b50c27e4..5ad56e7b4c6 100644 --- a/compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt +++ b/compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt @@ -6,7 +6,7 @@ interface A extends C { // FILE: B.kt -trait B : A { +interface B : A { fun bar() } diff --git a/compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt b/compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt index 0d587c7913e..1edd2e30e6d 100644 --- a/compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt +++ b/compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt @@ -1,11 +1,11 @@ // FILE: ExceptionTracker.kt -trait ExceptionTracker : LockBasedStorageManager.ExceptionHandlingStrategy { +interface ExceptionTracker : LockBasedStorageManager.ExceptionHandlingStrategy { } // FILE: StorageManager.kt -trait StorageManager : ExceptionTracker { +interface StorageManager : ExceptionTracker { fun foo() } diff --git a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt index 144286c58ed..7cb40548632 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt +++ b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun component1(): Int } diff --git a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt index 4e46de1163f..8efc12249f6 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt +++ b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt @@ -1,4 +1,4 @@ -trait T { +interface T { final fun component1(): Int = 42 } diff --git a/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt b/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt index 5a667cac7b0..e6cd7eab473 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt @@ -1,4 +1,4 @@ -trait Expr +interface Expr class BinOp(val operator : String) : Expr fun test(e : Expr) { diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt index bf2293bb328..cd28f9b0ecc 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt @@ -1,4 +1,4 @@ -trait D { +interface D { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt index 41708ae9e57..5a828797628 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt @@ -1,4 +1,4 @@ -trait D { +interface D { fun foo(): String = "" } diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt index b9cfcd6c29e..38b9340f85a 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt @@ -10,7 +10,7 @@ fun f(a: Any?) { } } -trait B { +interface B { fun foo() {} } open class X(b: B) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt index 32f5d1b1af7..a937c8bdb11 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt @@ -1,6 +1,6 @@ // KT-2225 Object expression delegation parameter should be checked with data flow info -trait A { +interface A { fun foo() : Int } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt index d1ed5a0eb2f..ea5e8ede713 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt @@ -1,6 +1,6 @@ // !CHECK_TYPE -trait G { +interface G { fun get(x: Int, y: Int): Int = x + y fun set(x: Int, y: Int, value: Int) {} } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt index 02f061d7ba4..09563b897f7 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt @@ -1,5 +1,5 @@ -trait A -trait B : A { +interface A +interface B : A { fun foo() } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt index 36bae29e745..5197a621d68 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt @@ -1,8 +1,8 @@ // KT-2825 DataFlowInfo is not retained after assignment -trait A +interface A -trait B : A { +interface B : A { fun foo() } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt index e4d901c387f..68e9e099cf9 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait A +interface A -trait B : A +interface B : A fun B.compareTo(b: B) = if (this == b) 0 else 1 fun foo(a: A): Boolean { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt index 312009ea0a0..ca529d1337d 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -trait A -trait B : A +interface A +interface B : A fun foo1(a: A, b: B): Boolean { val result = (a as B) == b diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt index 36551a1ca38..d6e0f6ac247 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait A +interface A -trait B : A +interface B : A fun B.plus(b: B) = if (this == b) b else this fun foo(a: A): B { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt index 93097f4489d..74e7f6924e8 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt @@ -1,4 +1,4 @@ -trait B { +interface B { fun bar() {} } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt index ab3cfab05fc..e41ee3cd045 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt @@ -74,7 +74,7 @@ fun Any?.foo() : Int { } -trait T {} +interface T {} open class C { fun foo() { diff --git a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt index 70c6bd895de..4451972d529 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt @@ -1,6 +1,6 @@ annotation class a -trait A -trait B +interface A +interface B fun () {} fun A.() {} diff --git a/compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt b/compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt index eaf60600357..34d002fe049 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt @@ -1,4 +1,4 @@ -trait MyTrait { +interface MyTrait { fun f1() {} } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt index b940b6d1a44..8a5deec1784 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt @@ -15,5 +15,5 @@ final object B4 {} override enum class C {} -override trait D {} +override interface D {} override annotation class E diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt index 3106a880fc5..8ff4388f74e 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt @@ -2,7 +2,7 @@ package kt1141 -public trait SomeTrait { +public interface SomeTrait { fun foo() } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt index 0b5e602d432..7149a9f90fb 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt @@ -1,7 +1,7 @@ //KT-2397 Prohibit final methods in traits with no implementation package a -trait T { +interface T { final fun foo() final val b : Int diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt index 4ec29930810..0560f15cf9d 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait A { +interface A { val prop: Int } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt index 236edfde773..ca7cb09ce06 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait A { +interface A { val prop: Int } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt index fb10ae2726f..eef69f71f7b 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait T { +interface T { val a: Int by Delegate() } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt index 786ef8dab41..d8bf1eaf054 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt @@ -38,11 +38,11 @@ object O { fun getMyProperty() = MyProperty() } -trait MyPropertyContainer { +interface MyPropertyContainer { fun getMyProperty(): MyProperty } -trait Outer { +interface Outer { fun getContainer(): MyPropertyContainer } diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt b/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt index 9777d79cb0e..51859a91f2b 100644 --- a/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt +++ b/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt @@ -1,6 +1,6 @@ package override -trait T { +interface T { fun foo() val v : Int } @@ -21,7 +21,7 @@ class Br2(t : T) : Br1(t) { } -trait G { +interface G { fun foo(t : T) : T } diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt index d795d700bfe..98255091ab1 100644 --- a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt +++ b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait A { +interface A { fun foo(): Int } diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt b/compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt index a6ee551a1e8..044c92ed23a 100644 --- a/compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt +++ b/compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt @@ -4,7 +4,7 @@ open class Foo() { class Barrr() : Foo by Foo() {} -trait T {} +interface T {} class Br(t : T) : T by t {} diff --git a/compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt b/compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt index 5dc08ebb127..906b40675ab 100644 --- a/compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt +++ b/compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt @@ -1,12 +1,12 @@ // !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS -trait One { +interface One { public fun foo(): Any? } -trait Two { +interface Two { public fun foo(): String? } -trait Three { +interface Three { public fun foo(): String } diff --git a/compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt b/compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt index 46fc4d424f8..a92b0861c9f 100644 --- a/compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt +++ b/compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt b/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt index bb5209747a9..26501f0de2e 100644 --- a/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt +++ b/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt @@ -1,16 +1,16 @@ // !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS -trait One { +interface One { public open fun foo() : Int private fun boo() = 10 } -trait Two { +interface Two { public open fun foo() : Int } -trait OneImpl : One { +interface OneImpl : One { public override fun foo() = 1 } -trait TwoImpl : Two { +interface TwoImpl : Two { public override fun foo() = 2 } diff --git a/compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt b/compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt index d4255d31081..269d5360436 100644 --- a/compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt +++ b/compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo() {} } -trait B : A {} +interface B : A {} class C(b : B) : B by b { diff --git a/compiler/testData/diagnostics/tests/deprecated/typeUsage.kt b/compiler/testData/diagnostics/tests/deprecated/typeUsage.kt index a53c3b48d9e..a8765891d4c 100644 --- a/compiler/testData/diagnostics/tests/deprecated/typeUsage.kt +++ b/compiler/testData/diagnostics/tests/deprecated/typeUsage.kt @@ -8,7 +8,7 @@ open class Obsolete2 [deprecated("Constructor")]() { fun use() {} } -trait Generic +interface Generic open class Derived() : Obsolete() diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt index 69ae81fea64..c0f7cfff409 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt @@ -1,8 +1,8 @@ -trait B { +interface B { fun getX() = 1 } -trait D { +interface D { val x: Int } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt index 6c012b7706a..a40245e86d7 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt @@ -1,4 +1,4 @@ -trait B { +interface B { fun getX() = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt index 77a52be51e5..9c8dc4b1f62 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt @@ -2,6 +2,6 @@ open class C { val x = 1 } -trait Tr : C { +interface Tr : C { fun getX() = 1 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt index 51c5ab88129..64fc7a27d37 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun getX() = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyInTrait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyInTrait.kt index 7ac61cb4db6..0500cd621d7 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyInTrait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyInTrait.kt @@ -1,8 +1,8 @@ -trait T { +interface T { fun getX() = 1 } -trait C : T { +interface C : T { val x: Int get() = 1 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt index fd6f97455e4..428eaedd188 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun getX(): Int } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt index db45ec43175..c5be4f32551 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt @@ -1,4 +1,4 @@ -trait T { +interface T { val x: Int get() = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionInTrait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionInTrait.kt index d969e1791a4..106aa378526 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionInTrait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionInTrait.kt @@ -1,8 +1,8 @@ -trait T { +interface T { val x: Int get() = 1 } -trait C : T { +interface C : T { fun getX() = 1 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt index 40b17a13d66..de87b96c878 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt @@ -1,4 +1,4 @@ -trait T { +interface T { val x: Int } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt index 9edaa67505c..8dfae66af87 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait B { +interface B { fun foo(t: T) {} } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt index 347a8b77304..d9f9b35cab0 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait B { +interface B { fun foo(t: T) {} } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt index 6bcfc98e761..aac2ee72029 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt @@ -1,10 +1,10 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo { +interface Foo { fun foo(l: List) } -trait Bar { +interface Bar { fun foo(l: List) } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt index 24bb8407236..6191d8ff095 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo { +interface Foo { fun foo(l: List) } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt index 7c4fb7ba4bb..7e6b4cec1b5 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo { +interface Foo { fun foo(l: List) { } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt index 8ea037951ba..a71a6f68d2e 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt @@ -1,10 +1,10 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo { +interface Foo { fun foo(l: List) {} } -trait Bar { +interface Bar { fun foo(l: List) {} } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt index 72745e0037a..32ababfffdd 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt @@ -1,10 +1,10 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait A { +interface A { fun foo(l: List) } -trait B { +interface B { fun foo(l: List) {} } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt index c684dce2dcb..9c29e9fc29a 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt @@ -1,10 +1,10 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo { +interface Foo { fun foo(l: List) {} } -trait Bar { +interface Bar { fun foo(l: List) {} } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt index d66ab7c93ba..ab5c6ef5fe2 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo +interface Foo fun foo(x: T): T {null!!} fun foo(x: Foo): Foo {null!!} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt index 3909c4424f9..ceadd5a3234 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo -trait Bar +interface Foo +interface Bar fun foo(x: T): T where T: Bar {null!!} fun foo(x: Foo): Foo {null!!} diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt index e33242be422..426fa852797 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait Foo -trait Bar +interface Foo +interface Bar fun foo(x: T): T where T: Foo, T: Bar {null!!} fun foo(x: Foo): Foo {null!!} diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt index b121dc589a9..81fca7ab9c5 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt @@ -1,4 +1,4 @@ -trait T { +interface T { val x: Int get() = 1 fun getX() = 1 diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt index 4cda9be3e44..590b43d196c 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt @@ -1,4 +1,4 @@ -trait T { +interface T { val x: ErrorType fun getX(): ErrorType1 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt index 1ecc779baaa..fb9c341bb22 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt @@ -16,7 +16,7 @@ object { } -trait { +interface { } @@ -43,7 +43,7 @@ class Outer { } - trait { + interface { } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt index 80ccd8f1618..5ea8a8690ad 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt @@ -1,4 +1,4 @@ -trait Foo +interface Foo class Bar(f: Foo) : Foo by f { val `$delegate_0`: Foo? = null diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt index e5d4ed3fa70..171fa6ce100 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun getX() = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt index 7f9179d9924..a1f17330267 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt @@ -1,8 +1,8 @@ -trait T1 { +interface T1 { fun getX() = 1 } -trait T2 { +interface T2 { val x: Int get() = 1 } diff --git a/compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt b/compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt index 31f77fa7ee2..020a46b8a29 100644 --- a/compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt +++ b/compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt @@ -1,4 +1,4 @@ -trait Tr { +interface Tr { fun foo() } diff --git a/compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt b/compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt index f37453fe03c..f053dfbf5a6 100644 --- a/compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt +++ b/compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt @@ -7,6 +7,6 @@ enum class E : T { abstract override fun f() } -trait T { +interface T { fun f() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt b/compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt index e0d0e769052..f26059f5e59 100644 --- a/compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt +++ b/compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt @@ -1,4 +1,4 @@ -trait T1 { +interface T1 { fun foo() } @@ -9,7 +9,7 @@ enum class EnumImplementingTraitWithFun: T1 { E2 } -trait T2 { +interface T2 { val bar: Int } diff --git a/compiler/testData/diagnostics/tests/enum/enumInheritance.kt b/compiler/testData/diagnostics/tests/enum/enumInheritance.kt index 81fc0409dff..ff0f2a425fc 100644 --- a/compiler/testData/diagnostics/tests/enum/enumInheritance.kt +++ b/compiler/testData/diagnostics/tests/enum/enumInheritance.kt @@ -7,5 +7,5 @@ open class MyClass() {} enum class MyEnumBase() {} -trait MyTrait {} +interface MyTrait {} diff --git a/compiler/testData/diagnostics/tests/enum/enumModifier.kt b/compiler/testData/diagnostics/tests/enum/enumModifier.kt index 3f9a6e12e8d..15e6c87869d 100644 --- a/compiler/testData/diagnostics/tests/enum/enumModifier.kt +++ b/compiler/testData/diagnostics/tests/enum/enumModifier.kt @@ -6,7 +6,7 @@ class A { enum object O {} -enum trait T {} +enum interface T {} enum fun f() = 0 diff --git a/compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt b/compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt index 4138b24d5c7..5d04181c73b 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt +++ b/compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt @@ -1,4 +1,4 @@ -trait A { +interface A { enum class E { ENTRY } diff --git a/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt b/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt index 9f97b9eea92..16744a9ad03 100644 --- a/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt +++ b/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt @@ -1,4 +1,4 @@ -trait T { +interface T { fun foo() {} fun buzz() {} fun buzz1(i : Int) {} diff --git a/compiler/testData/diagnostics/tests/extensions/GenericIterator.kt b/compiler/testData/diagnostics/tests/extensions/GenericIterator.kt index 5fbb228f3e8..a3f7c02519a 100644 --- a/compiler/testData/diagnostics/tests/extensions/GenericIterator.kt +++ b/compiler/testData/diagnostics/tests/extensions/GenericIterator.kt @@ -6,7 +6,7 @@ fun java.util.Enumeration.iterator() = object: Iterator { override fun next() = nextElement() } -trait MyIterator { +interface MyIterator { fun hasNext() : Boolean diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.kt b/compiler/testData/diagnostics/tests/extensions/classObject.kt index e392d98976b..e6d4e5aa45f 100644 --- a/compiler/testData/diagnostics/tests/extensions/classObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/classObject.kt @@ -1,4 +1,4 @@ -trait Tr +interface Tr class A { companion object } class B { companion object : Tr } diff --git a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt index 8de61054bd3..6c7b9b17d6a 100644 --- a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait JPAEntityClass { +interface JPAEntityClass { fun T.findByName(s: String): D {null!!} } diff --git a/compiler/testData/diagnostics/tests/extensions/kt1875.kt b/compiler/testData/diagnostics/tests/extensions/kt1875.kt index 3d2666e8e30..83654a9d1be 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt1875.kt +++ b/compiler/testData/diagnostics/tests/extensions/kt1875.kt @@ -4,7 +4,7 @@ package kt1875 fun f(a : Int?, b : Int.(Int)->Int) = a?.b(1) //unnecessary safe call warning -trait T { +interface T { val f : ((i: Int) -> Unit)? } diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt index bd7b8379f5a..bbcef2b140c 100644 --- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt +++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt @@ -23,7 +23,7 @@ fun test3(s: String?) { s.foo("a") } -trait A +interface A fun T.c() {} fun test4() { diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt b/compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt index 108e658e5c3..b36419582fa 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -trait B { +interface B { fun b_fun() {} } diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt b/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt index 9d1b25296f8..118af628948 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -trait A +interface A fun devNull(a: Any?){} val generic_fun = fun(t: T): T = null!! diff --git a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt index 08b3e7ba7eb..886f9079cc2 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt @@ -1,7 +1,7 @@ package a -trait Super -trait Trait : Super +interface Super +interface Trait : Super class Sub : Trait fun foo(f: (Trait) -> Trait) = f diff --git a/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt b/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt index 17d3b8ddd79..ef9f257117a 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt @@ -1,9 +1,9 @@ package h //traits to make ambiguity with function literal as an argument -trait A -trait B -trait C: A, B +interface A +interface B +interface C: A, B fun foo(a: A, f: () -> T): T = f() fun foo(b: B, f: () -> T): T = f() diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt index 6db7f204afb..5d524cf4236 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt @@ -1,8 +1,8 @@ // !CHECK_TYPE -trait A -trait B: A -trait C: A +interface A +interface B: A +interface C: A fun test(a: C, b: B) { diff --git a/compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt b/compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt index 8110dc40a3c..a8d7942f421 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt @@ -1,6 +1,6 @@ package m -trait Element +interface Element fun test(handlers: MapUnit>) { diff --git a/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt b/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt index 23b8bcf37e6..bfb9427eff2 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt @@ -1,6 +1,6 @@ package m -trait Element +interface Element fun test(handlers: MapUnit>) { diff --git a/compiler/testData/diagnostics/tests/generics/argumentsForT.kt b/compiler/testData/diagnostics/tests/generics/argumentsForT.kt index 62094b66761..603950448eb 100644 --- a/compiler/testData/diagnostics/tests/generics/argumentsForT.kt +++ b/compiler/testData/diagnostics/tests/generics/argumentsForT.kt @@ -2,6 +2,6 @@ fun foo(t: T) {} -trait A +interface A class B fun foo1(t: TString>>) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/generics/recursive.kt b/compiler/testData/diagnostics/tests/generics/recursive.kt index c2dc9fd7fd6..690c18b7f65 100644 --- a/compiler/testData/diagnostics/tests/generics/recursive.kt +++ b/compiler/testData/diagnostics/tests/generics/recursive.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -trait Rec +interface Rec class A : Rec class B : Rec diff --git a/compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt b/compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt index bf658a20f36..543e3f9646b 100644 --- a/compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt +++ b/compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt @@ -2,6 +2,6 @@ object O : Tr> -trait Tr +interface Tr class V diff --git a/compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt b/compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt index ad1faefeef0..0483b755a92 100644 --- a/compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt +++ b/compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt @@ -1,5 +1,5 @@ // !CHECK_TYPE -trait Tr { +interface Tr { var v: Tr } diff --git a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt index 781c69c09cc..2437a4ad028 100644 --- a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt +++ b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_PARAMETER // !CHECK_TYPE // t is unused due to KT-4233 -trait Tr { +interface Tr { var v: T } diff --git a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt index 8f92eb93981..bd8a66c4724 100644 --- a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt +++ b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNREACHABLE_CODE -trait Tr { +interface Tr { var v: T } diff --git a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt index a76e4ea4630..85a976ac8b7 100644 --- a/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt +++ b/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNREACHABLE_CODE -trait Tr { +interface Tr { var v: T } diff --git a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt index 07767db56ed..ad407c6bc68 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION package d -trait A +interface A fun infer(a: A) : T {} diff --git a/compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt b/compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt index b85f61691c5..aae592088d5 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND // !CHECK_TYPE -trait A +interface A fun foo(a: A, aN: A): T = throw Exception("$a $aN") diff --git a/compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt b/compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt index 4ab6d7d1a57..d49d4c3a0bc 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt @@ -2,9 +2,9 @@ package kt7351 -trait Node +interface Node -trait Source { +interface Source { fun f() : T } fun > S.woo() : T = this.f() diff --git a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt index 901e59115a4..ebb32733fdf 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt @@ -1,9 +1,9 @@ // !CHECK_TYPE -trait A +interface A -trait In +interface In -trait Out +interface Out fun doT(t: T?): T = throw Exception("$t") fun doOut(o: Out): T { throw Exception("$o") } diff --git a/compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt b/compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt index 20e5c1b5d74..c9466330f55 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt @@ -1,8 +1,8 @@ // !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND // !CHECK_TYPE -trait A +interface A -trait Out +interface Out fun foo(a: A, o: Out): T = throw Exception("$a $o") diff --git a/compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt b/compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt index f7c98c3d87f..7eb272e4d00 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt @@ -1,8 +1,8 @@ // !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND // !CHECK_TYPE -trait A +interface A -trait In +interface In fun foo(a: A, i: In): T = throw Exception("$a $i") diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt index 0fb771d5223..44e791a7adb 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt @@ -1,10 +1,10 @@ package h -trait A {} +interface A {} fun newA(): A = throw Exception() -trait Z +interface Z fun id(t: T): T = t diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt index 9525f5ec59f..ee388bc2f2e 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt @@ -1,6 +1,6 @@ package j -trait MyFunc {} +interface MyFunc {} class A(val b: B) { } diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt index fe6ed6b92fc..247b064a19a 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt @@ -1,11 +1,11 @@ package a -trait A { +interface A { val b: B val nb: B? } -trait B { +interface B { fun foo(): Int } diff --git a/compiler/testData/diagnostics/tests/inference/opposite.kt b/compiler/testData/diagnostics/tests/inference/opposite.kt index 8d9a02237b4..842dfeb34d4 100644 --- a/compiler/testData/diagnostics/tests/inference/opposite.kt +++ b/compiler/testData/diagnostics/tests/inference/opposite.kt @@ -1,7 +1,7 @@ package a -trait Persistent -trait PersistentFactory +interface Persistent +interface PersistentFactory class Relation( val sources: PersistentFactory, diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt index edf1d078551..885332963fc 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt @@ -2,7 +2,7 @@ package a -trait Foo +interface Foo fun Foo.map(f: (A) -> B): Foo = object : Foo {} diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt index d4f539a6032..58fd4574321 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt @@ -1,9 +1,9 @@ //KT-2320 failure of complex case of type inference package i -trait NotMap +interface NotMap -trait Entry { +interface Entry { fun getValue(): B } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt index c29cc4de561..1cf5f033ff8 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt @@ -4,7 +4,7 @@ package a -trait MyType {} +interface MyType {} class MyClass : MyType {} public open class HttpResponse() { diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt index a132cc388d9..fc9a779053e 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt @@ -1,6 +1,6 @@ package a -trait Closeable {} +interface Closeable {} class C : Closeable {} public inline fun T.use1(block: (T)-> R) : R { diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt index aa0fbcbe7bd..71a2754783b 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt @@ -1,6 +1,6 @@ package a -trait Closeable { +interface Closeable { fun close() {} } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt index 988a80d322a..0ddd3367e39 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt @@ -1,6 +1,6 @@ package a -trait Closeable { +interface Closeable { fun close() {} } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt index 1eb4c5f5808..ad85125cb40 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt @@ -1,6 +1,6 @@ package a -trait Closeable { +interface Closeable { fun close() {} } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt index 14aea41848c..cfaf66d57b6 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt @@ -1,6 +1,6 @@ package c -trait A +interface A fun test(a: A?) { a.foo() //no error diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt index 32fcb64bfb3..7352d758547 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt @@ -2,8 +2,8 @@ package arrays -trait A -trait B +interface A +interface B object CAB : A, B object DAB : A, B diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt index 235b80dd691..7d177138b51 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt @@ -1,6 +1,6 @@ package a -trait Closeable {} +interface Closeable {} class C : Closeable {} fun T.foo(block: (T)-> R) = block diff --git a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt index 9ce13d9435a..d6962f5007d 100644 --- a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt @@ -11,14 +11,14 @@ fun newList() : ArrayList { return ArrayList() } -trait Out -trait In +interface Out +interface In -trait Two +interface Two -trait A -trait B: A -trait C: A +interface A +interface B: A +interface C: A fun foo(o: Out, i: In): Two = throw Exception("$o $i") diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt index a663002f8d0..1e5cd3be0e3 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt @@ -1,6 +1,6 @@ package a -trait A +interface A fun emptyList(): List = throw Exception() diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt index 7a340945d98..1d727a2feb2 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt @@ -2,11 +2,11 @@ package s -trait In +interface In -trait A -trait B -trait C: A, B +interface A +interface B +interface C: A, B fun foo(in1: In, in2: In): T = throw Exception("$in1 $in2") diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt index 92dcd5508bf..21379475c41 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt @@ -4,7 +4,7 @@ fun foo(v: Any): T? = unescape(v) //-------------- -trait A +interface A fun unescapeA(value: Any): R? = throw Exception("$value") diff --git a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt index 4a2765e39a7..c3a09923a59 100644 --- a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt +++ b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt @@ -27,7 +27,7 @@ abstract class A { } -trait B { +interface B { inline private fun good1() {} inline public final fun good2() {} diff --git a/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt b/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt index 715960984f0..0ca1ab2dad2 100644 --- a/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt +++ b/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt @@ -1,4 +1,4 @@ -trait P +interface P class A { class B { diff --git a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt index da5f275fa8e..556cf1985ee 100644 --- a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt +++ b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt @@ -22,6 +22,6 @@ class B { open class Request(private val handler: ActionContext.() -> Unit) {} -trait ActionContext { +interface ActionContext { val session : Map } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt b/compiler/testData/diagnostics/tests/inner/illegalModifier.kt index dc22042df29..340d6175aa8 100644 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt +++ b/compiler/testData/diagnostics/tests/inner/illegalModifier.kt @@ -2,12 +2,12 @@ inner val prop = 42 inner class A -inner trait B +inner interface B inner object C class D { inner class E - inner trait F + inner interface F inner object G inner enum class R inner annotation class S @@ -22,7 +22,7 @@ enum class H { inner class J } -trait K { +interface K { inner class L } diff --git a/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt b/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt index d281a90a3bc..93fec418bc3 100644 --- a/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt +++ b/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt @@ -1,4 +1,4 @@ -trait Trait { +interface Trait { fun bar() = 42 } diff --git a/compiler/testData/diagnostics/tests/inner/localThisSuper.kt b/compiler/testData/diagnostics/tests/inner/localThisSuper.kt index a2c87bc61e5..ecc13ab9fa8 100644 --- a/compiler/testData/diagnostics/tests/inner/localThisSuper.kt +++ b/compiler/testData/diagnostics/tests/inner/localThisSuper.kt @@ -1,4 +1,4 @@ -trait Trait { +interface Trait { fun bar() = 42 } diff --git a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt index 95b3b9e8619..1bf30bf8e15 100644 --- a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt +++ b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt @@ -1,4 +1,4 @@ -trait N { fun foo() = 1 } +interface N { fun foo() = 1 } class WithClassObject { companion object {} diff --git a/compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt b/compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt index f296afce973..5f0064e9227 100644 --- a/compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt +++ b/compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt @@ -1,6 +1,6 @@ // KT-2100 -trait I { +interface I { val x : String } diff --git a/compiler/testData/diagnostics/tests/inner/traits.kt b/compiler/testData/diagnostics/tests/inner/traits.kt index 22ae17ed3c0..7135bf91889 100644 --- a/compiler/testData/diagnostics/tests/inner/traits.kt +++ b/compiler/testData/diagnostics/tests/inner/traits.kt @@ -1,11 +1,11 @@ // KT-1188 -trait Foo { +interface Foo { val b : Bar val b1 : Foo.Bar - trait Bar {} + interface Bar {} } -trait Foo2 : Foo { +interface Foo2 : Foo { val bb1 : Foo.Bar } diff --git a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt index be3e53a03ab..4c9969aaa63 100644 --- a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt +++ b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt @@ -9,7 +9,7 @@ public interface G { package p; -public trait A { +public interface A { fun foo(p: A) } diff --git a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt index 674063ec398..cb9f85d3466 100644 --- a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt +++ b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt @@ -5,12 +5,12 @@ public interface I extends Boo { } // FILE: Baz.kt -public trait Foo { +public interface Foo { companion object { public val EMPTY: Foo = object : Foo{} } } -trait Boo +interface Boo public class Baz : Bar.I \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt b/compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt index b406a3a6ffc..f092b608f92 100644 --- a/compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt +++ b/compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt @@ -1,6 +1,6 @@ // FILE: AC.kt -trait A { +interface A { val a: Int } diff --git a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt index 3ea6f225197..3ee1de5aa45 100644 --- a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt +++ b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt @@ -6,7 +6,7 @@ public interface Test { } // FILE: test.kt -trait KTrait : Test { +interface KTrait : Test { fun ktest() { super.test() diff --git a/compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt b/compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt index 1ed711d3d89..a1c0881c106 100644 --- a/compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt +++ b/compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun foo() } -trait B { +interface B { fun bar() } diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt index 5d4790d90d0..2b7bdc8e2d9 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt @@ -10,7 +10,7 @@ abstract class A() { abstract protected set } -final trait T {} +final interface T {} class FinalClass() { open fun foo() {} diff --git a/compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt b/compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt index 29a2a6e2848..0b2d020f1f6 100644 --- a/compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt +++ b/compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt @@ -27,7 +27,7 @@ class D { companion object } -companion trait H { +companion interface H { companion object } diff --git a/compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt b/compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt index 65a6b0a5938..7902c43d96f 100644 --- a/compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt +++ b/compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt @@ -1,8 +1,8 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -trait Foo -trait Foo1<in out T> -trait Foo2<in in T> +interface Foo +interface Foo1<in out T> +interface Foo2<in in T> fun test1(foo: Foo<in out Int>) = foo fun test2(): Foo<in in Int> = throw Exception() diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt index 1c7c0c25f5f..73f4f212412 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt @@ -4,7 +4,7 @@ package p -public trait A +public interface A public class B : A public class M1 { public val b: B = B() @@ -15,7 +15,7 @@ public class M1 { package p -public trait A +public interface A public fun foo(a: A) { } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt index f314f262fbb..69e03860965 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt @@ -4,9 +4,9 @@ package p -public trait A -public trait C -public trait D +public interface A +public interface C +public interface D public class B : A, C, D public class M1 { public val b: B = B() @@ -17,9 +17,9 @@ public class M1 { package p -public trait A -public trait C -public trait D +public interface A +public interface C +public interface D public fun a(a: A) { } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt index f655228dd2e..0e18c8328c5 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T) } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: X) } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt index 64a88dd85f3..c5517ab355e 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T?) } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: X?) } @@ -21,9 +21,9 @@ public trait C : B { // FILE: b.kt package p -public trait Tr +public interface Tr -public trait B { +public interface B { public fun foo(a: T?) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt index bd30e5bc977..4616eec5f97 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T?) } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: X?) } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B<_, T> { +public interface B<_, T> { public fun foo(a: T?) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt index 09ea2e65ce8..29319ea33d2 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T) } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: X) } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T1) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt index 5ed12f3a289..c34bad8053e 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(): T } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(): X } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(): T } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt index 46478cdea13..10e5ac41d46 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt @@ -2,7 +2,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T, b : R) } @@ -10,7 +10,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: Any?, b : R) } @@ -19,7 +19,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T, b: R) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt index 4ae00f94b8c..526164bc3fb 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun getParent(): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun getParent(): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun getParent(): Any? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt index 2c886b60d7f..8216b3b3826 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: Int, b: String): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: Int, b: String): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a1: Int, b1: String): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt index dd765ec7db5..de288240c3e 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt @@ -4,14 +4,14 @@ // FILE: a.kt package p -public trait G1 -public trait G2 +public interface G1 +public interface G2 // MODULE: m1(m0) // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: G1?, b: G2?) } @@ -19,7 +19,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: G1?, b: G2?) } @@ -28,7 +28,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: G1?, b: G2?) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt index 6384bf6263c..10ed61a7b4a 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt @@ -2,7 +2,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: Int, b: String): B? } @@ -10,7 +10,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: Int, b: String): B? } @@ -19,7 +19,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: Int, b: String, c: Int = 0): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt index 2d8d73cafb0..c5a2ae6e589 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun getParent(): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun getParent(): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun getParent(): Int } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt index 1aa5dc3c464..ca4e7ae7fc1 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun String.getParent(): B? } @@ -21,7 +21,7 @@ public class C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun String.getParent(): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt index b54c491a2c3..5a77fca6ea8 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt index 11e29337334..cba582efada 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): B? } @@ -21,9 +21,9 @@ public trait C : B { // FILE: b.kt package p -public trait Tr +public interface Tr -public trait B { +public interface B { public fun foo(a: T): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt index fd4333fa1f0..664571d7d31 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt index dfe50080dbb..fbee8deeebb 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): B? } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt index b2bb4cf53f0..eedb07f2980 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt @@ -4,9 +4,9 @@ // FILE: a.kt package p -public trait Foo +public interface Foo -public trait B { +public interface B { public fun foo(a: T): Foo } @@ -14,7 +14,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): Foo } @@ -23,9 +23,9 @@ public trait C : B { // FILE: b.kt package p -public trait Foo +public interface Foo -public trait B { +public interface B { public fun foo(a: T): Foo } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt index 0dc4ae48a59..41dc5643fc5 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T): T } @@ -12,7 +12,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: T): T } @@ -21,7 +21,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: T): T } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt index 51e6d8c4210..84cbfb3e873 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt @@ -3,7 +3,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: Int, b: String): B? } @@ -11,7 +11,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: Int, b: String): B? } @@ -20,7 +20,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: Int, b: String): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt index b89799a8c1e..93d62b46463 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt @@ -4,7 +4,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun getParent(): B? } @@ -21,7 +21,7 @@ public class C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun getParent(): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt index 2d51f1c54ac..5b09a2c6188 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt @@ -4,14 +4,14 @@ // FILE: a.kt package p -public trait G1 -public trait G2 +public interface G1 +public interface G2 // MODULE: m1(m0) // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: G1, b: G2): B? } @@ -19,7 +19,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: G1, b: G2): B? } @@ -28,7 +28,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: G1, b: G2): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt index 3b744395658..e91afea2b00 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt @@ -2,7 +2,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun getParent(): B? } @@ -10,7 +10,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun getParent(): B? } @@ -19,11 +19,11 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun getParent(): B? } -public trait D : B { +public interface D : B { override fun getParent(): B? } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt index 1e1f7af281f..99c243becf6 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt @@ -2,7 +2,7 @@ // FILE: a.kt package p -public trait B { +public interface B { public fun foo(a: T) } @@ -10,7 +10,7 @@ public trait B { // FILE: b.kt package p -public trait C : B { +public interface C : B { override fun foo(a: String) } @@ -19,7 +19,7 @@ public trait C : B { // FILE: b.kt package p -public trait B { +public interface B { public fun foo(a: String) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt index e464dd3e5af..99450485c7a 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt @@ -2,26 +2,26 @@ // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo() {} } -public trait A : Base { +public interface A : Base { override fun foo() {} } -public trait C : A +public interface C : A // MODULE: m2 // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo() {} } -public trait B : Base +public interface B : Base // MODULE: m3(m1, m2) // FILE: x.kt diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt index beec4542a11..b6d5d833f04 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt @@ -2,21 +2,21 @@ // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo() {} } -public trait A : Base +public interface A : Base // MODULE: m2 // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo() {} } -public trait B : Base +public interface B : Base // MODULE: m3(m1, m2) // FILE: x.kt diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt index fe614275034..4c1e52747a4 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt @@ -2,21 +2,21 @@ // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo(t: Array) {} } -public trait A : Base +public interface A : Base // MODULE: m2 // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo(t: Array) {} } -public trait B : Base +public interface B : Base // MODULE: m3(m1, m2) // FILE: x.kt diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt index ce74602efd8..6fceaf1f9e1 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt @@ -2,21 +2,21 @@ // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo(t: T) {} } -public trait A : Base +public interface A : Base // MODULE: m2 // FILE: x.kt package p -public trait Base { +public interface Base { public fun foo(t: T) {} } -public trait B : Base +public interface B : Base // MODULE: m3(m1, m2) // FILE: x.kt diff --git a/compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt b/compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt index f0958284d4f..5c0780f4e90 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt @@ -1,5 +1,5 @@ -trait A -trait X: A?? { +interface A +interface X: A?? { } diff --git a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt index 181a152ecb4..a80068ed652 100644 --- a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt +++ b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt @@ -38,7 +38,7 @@ fun test() { fun use(vararg a: Any?) = a -trait Inv +interface Inv fun exactBound(t: T, l: Inv): T = throw Exception("$t $l") @@ -50,7 +50,7 @@ fun testExactBound(invS: Inv, invI: Inv, invB: Inv) { b checkType { _() } } -trait Cov +interface Cov fun lowerBound(t: T, l : Cov): T = throw Exception("$t $l") @@ -62,7 +62,7 @@ fun testLowerBound(cov: Cov, covN: Cov) { n checkType { _() } } -trait Contr +interface Contr fun upperBound(t: T, l: Contr): T = throw Exception("$t $l") diff --git a/compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt b/compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt index 324f54a836c..c33e4d8c577 100644 --- a/compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt @@ -1,6 +1,6 @@ -trait A +interface A -trait B +interface B fun test1(): B = object : A { } diff --git a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt index 20162fc1ec9..7482dad5350 100644 --- a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt +++ b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt @@ -1,4 +1,4 @@ -trait Trait +interface Trait object O1 : Trait diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt index 43802e11053..82e00331c6d 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt @@ -1,9 +1,9 @@ //KT-1821 Write test for ITERATOR_AMBIGUITY diagnostic -trait MyCollectionInterface { +interface MyCollectionInterface { } -trait MyAnotherCollectionInterface { +interface MyAnotherCollectionInterface { } class MyCollection : MyCollectionInterface, MyAnotherCollectionInterface { diff --git a/compiler/testData/diagnostics/tests/overload/kt2493.kt b/compiler/testData/diagnostics/tests/overload/kt2493.kt index 2d8bcf47b24..d3c35d046d3 100644 --- a/compiler/testData/diagnostics/tests/overload/kt2493.kt +++ b/compiler/testData/diagnostics/tests/overload/kt2493.kt @@ -1,5 +1,5 @@ -trait A -trait B +interface A +interface B fun R.f() { } diff --git a/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt b/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt index a2c9376c61b..e92b440e116 100644 --- a/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt +++ b/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { private val a: String get() = "AAAA!" } diff --git a/compiler/testData/diagnostics/tests/override/AllProtectedFromSupertypes.kt b/compiler/testData/diagnostics/tests/override/AllProtectedFromSupertypes.kt index 9e3a75bf896..7660abbd08e 100644 --- a/compiler/testData/diagnostics/tests/override/AllProtectedFromSupertypes.kt +++ b/compiler/testData/diagnostics/tests/override/AllProtectedFromSupertypes.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { protected val a: String } diff --git a/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForProperty.kt b/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForProperty.kt index bc5ade515cc..864d1ec4901 100644 --- a/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForProperty.kt +++ b/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForProperty.kt @@ -1,13 +1,13 @@ -trait T { +interface T { internal var foo: Long } -trait U { +interface U { protected var foo: Long } -trait V : T, U { +interface V : T, U { override var foo: Long } -trait W : T, U +interface W : T, U diff --git a/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForPropertySetter.kt b/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForPropertySetter.kt index b65e0979cd5..041675041c8 100644 --- a/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForPropertySetter.kt +++ b/compiler/testData/diagnostics/tests/override/CannotInferVisibilityForPropertySetter.kt @@ -1,13 +1,13 @@ -trait T { +interface T { public var foo: Short internal set } -trait U { +interface U { public var foo: Short protected set } -trait V : T, U { +interface V : T, U { override var foo: Short } diff --git a/compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt b/compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt index 0c640b509c1..a27d78224ca 100644 --- a/compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt +++ b/compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt @@ -1,8 +1,8 @@ -trait Y { +interface Y { fun foo(a : Int = 1) } -trait YSub : Y { +interface YSub : Y { } diff --git a/compiler/testData/diagnostics/tests/override/Delegation.kt b/compiler/testData/diagnostics/tests/override/Delegation.kt index c3bbd70a80c..14558ca7464 100644 --- a/compiler/testData/diagnostics/tests/override/Delegation.kt +++ b/compiler/testData/diagnostics/tests/override/Delegation.kt @@ -1,18 +1,18 @@ package test -trait X { +interface X { fun foo(): String? { return null } } -trait Y { +interface Y { fun foo(): String { return "foo" } } -trait Incompatible { +interface Incompatible { fun foo(): Int { return 3 } diff --git a/compiler/testData/diagnostics/tests/override/DelegationFun.kt b/compiler/testData/diagnostics/tests/override/DelegationFun.kt index e2236b35b97..b7ff2c55ef7 100644 --- a/compiler/testData/diagnostics/tests/override/DelegationFun.kt +++ b/compiler/testData/diagnostics/tests/override/DelegationFun.kt @@ -1,6 +1,6 @@ package delegation -trait Aaa { +interface Aaa { fun foo() } diff --git a/compiler/testData/diagnostics/tests/override/DelegationVal.kt b/compiler/testData/diagnostics/tests/override/DelegationVal.kt index 076e5775265..7f7a506b5b5 100644 --- a/compiler/testData/diagnostics/tests/override/DelegationVal.kt +++ b/compiler/testData/diagnostics/tests/override/DelegationVal.kt @@ -1,6 +1,6 @@ package delegation -trait Aaa { +interface Aaa { val i: Int } diff --git a/compiler/testData/diagnostics/tests/override/DelegationVar.kt b/compiler/testData/diagnostics/tests/override/DelegationVar.kt index 5b8b34d62be..4c9a70763c1 100644 --- a/compiler/testData/diagnostics/tests/override/DelegationVar.kt +++ b/compiler/testData/diagnostics/tests/override/DelegationVar.kt @@ -1,6 +1,6 @@ package delegation -trait Aaa { +interface Aaa { var i: Int } diff --git a/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt b/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt index aefa4f1673f..15a21f53ec4 100644 --- a/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt +++ b/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt @@ -1,4 +1,4 @@ -trait Some { +interface Some { fun test() } diff --git a/compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt b/compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt index 7f312dd056f..fc35e955bac 100644 --- a/compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt +++ b/compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt @@ -1,7 +1,7 @@ -trait Foo -trait Bar +interface Foo +interface Bar -trait A { +interface A { fun foo() where T : Foo, T : Bar = Unit diff --git a/compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt b/compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt index 4ba1095f8fb..7c8c385152a 100644 --- a/compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt +++ b/compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt @@ -2,7 +2,7 @@ open class Ccc() { fun foo() = 1 } -trait Ttt { +interface Ttt { fun foo(): Int } diff --git a/compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt b/compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt index 39c650a1da5..aba4ace8df5 100644 --- a/compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt +++ b/compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun f(): String = "string" } diff --git a/compiler/testData/diagnostics/tests/override/Generics.kt b/compiler/testData/diagnostics/tests/override/Generics.kt index f63317b147e..6813df144a0 100644 --- a/compiler/testData/diagnostics/tests/override/Generics.kt +++ b/compiler/testData/diagnostics/tests/override/Generics.kt @@ -1,6 +1,6 @@ package override.generics -trait MyTrait { +interface MyTrait { fun foo(t: T) : T } @@ -9,7 +9,7 @@ abstract class MyAbstractClass { abstract val pr : T } -trait MyProps { +interface MyProps { val p : T } diff --git a/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt b/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt index aad916d41ef..f6aa6986f7c 100644 --- a/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt +++ b/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt @@ -1,8 +1,8 @@ -trait X { +interface X { fun foo(a : Int = 1) } -trait Y { +interface Y { fun foo(a : Int = 1) } diff --git a/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt b/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt index c3cc0415c30..71f542a7d31 100644 --- a/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt +++ b/compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt @@ -1,8 +1,8 @@ -trait X { +interface X { fun foo(a : Int = 1) } -trait Y { +interface Y { fun foo(a : Int = 1) } diff --git a/compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt b/compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt index 8f1c3bd0105..72d41113c68 100644 --- a/compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt +++ b/compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo(x: Int = 42): Int } @@ -6,7 +6,7 @@ open class B { fun foo(x: Int = 239) = x } -trait C { +interface C { fun foo(y: Int) } diff --git a/compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt b/compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt index 1acf36d6750..cf5ffb10eeb 100644 --- a/compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt +++ b/compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt @@ -1,8 +1,8 @@ -trait X { +interface X { fun foo(a : Int = 1) } -trait Y { +interface Y { fun foo(a : Int = 1) } diff --git a/compiler/testData/diagnostics/tests/override/NonGenerics.kt b/compiler/testData/diagnostics/tests/override/NonGenerics.kt index 6b36752da73..30a3688a219 100644 --- a/compiler/testData/diagnostics/tests/override/NonGenerics.kt +++ b/compiler/testData/diagnostics/tests/override/NonGenerics.kt @@ -1,6 +1,6 @@ package override.normal -trait MyTrait { +interface MyTrait { fun foo() val pr : Unit } diff --git a/compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt b/compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt index d40355f0a7e..88b245e5a67 100644 --- a/compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt +++ b/compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt @@ -1,8 +1,8 @@ -trait D { +interface D { fun foo() } -trait E { +interface E { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt b/compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt index 9624f096d3c..158db681970 100644 --- a/compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt +++ b/compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt @@ -1,8 +1,8 @@ -trait X { +interface X { fun foo(a : Int = 1) } -trait Y { +interface Y { fun foo(a : Int) } diff --git a/compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt b/compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt index 3af5d5d2385..1d53f7b54bb 100644 --- a/compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt +++ b/compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt @@ -1,16 +1,16 @@ package d -trait A { +interface A { fun foo() = 1 } -trait B { +interface B { fun foo() = 2 } open class C : A, B {} -trait E { +interface E { fun foo(): Int } diff --git a/compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt b/compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt index b686ba515ec..e1c459df79d 100644 --- a/compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt +++ b/compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt @@ -1,10 +1,10 @@ package test -trait A { +interface A { protected val a: String } -trait B { +interface B { protected val a: String } diff --git a/compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt b/compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt index 4d70df96987..e80e4732343 100644 --- a/compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt +++ b/compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt @@ -1,11 +1,11 @@ // NamedFunctionDescriptor.substitute substitutes "overrides" // this test checks it does it properly -trait Foo

{ +interface Foo

{ fun quux(p: P, q: Int = 17) : Int = 18 } -trait Bar : Foo +interface Bar : Foo abstract class Baz() : Bar diff --git a/compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt b/compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt index 562b38d826a..2c1da2c5766 100644 --- a/compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt +++ b/compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt @@ -1,10 +1,10 @@ // http://youtrack.jetbrains.com/issue/KT-1996 -trait Foo { +interface Foo { fun foo(): Unit } -trait Bar { +interface Bar { fun foo(): Unit } diff --git a/compiler/testData/diagnostics/tests/override/kt1862.kt b/compiler/testData/diagnostics/tests/override/kt1862.kt index bd70fba2f22..88d385ce68e 100644 --- a/compiler/testData/diagnostics/tests/override/kt1862.kt +++ b/compiler/testData/diagnostics/tests/override/kt1862.kt @@ -6,6 +6,6 @@ open class Bbb() : Aaa() { override fun foo() = 2 } -trait Ccc : Aaa +interface Ccc : Aaa class Ddd() : Bbb(), Ccc \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/override/kt2052.kt b/compiler/testData/diagnostics/tests/override/kt2052.kt index 5c772f6ce8d..4bd747ddc11 100644 --- a/compiler/testData/diagnostics/tests/override/kt2052.kt +++ b/compiler/testData/diagnostics/tests/override/kt2052.kt @@ -1,4 +1,4 @@ -trait Runnable { +interface Runnable { fun run() } diff --git a/compiler/testData/diagnostics/tests/override/kt2491.kt b/compiler/testData/diagnostics/tests/override/kt2491.kt index 02f0b8b74b9..6a924bc1985 100644 --- a/compiler/testData/diagnostics/tests/override/kt2491.kt +++ b/compiler/testData/diagnostics/tests/override/kt2491.kt @@ -1,4 +1,4 @@ -trait T { +interface T { public fun foo() } diff --git a/compiler/testData/diagnostics/tests/override/kt4763.kt b/compiler/testData/diagnostics/tests/override/kt4763.kt index cf9e4e67730..1cecb093fb9 100644 --- a/compiler/testData/diagnostics/tests/override/kt4763.kt +++ b/compiler/testData/diagnostics/tests/override/kt4763.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun f(): String } diff --git a/compiler/testData/diagnostics/tests/override/kt4763property.kt b/compiler/testData/diagnostics/tests/override/kt4763property.kt index ccd9a1fe0a4..68689497fd3 100644 --- a/compiler/testData/diagnostics/tests/override/kt4763property.kt +++ b/compiler/testData/diagnostics/tests/override/kt4763property.kt @@ -1,4 +1,4 @@ -trait P { +interface P { var f: Number } diff --git a/compiler/testData/diagnostics/tests/override/kt4785.kt b/compiler/testData/diagnostics/tests/override/kt4785.kt index a7c6036c4f7..a248fd77428 100644 --- a/compiler/testData/diagnostics/tests/override/kt4785.kt +++ b/compiler/testData/diagnostics/tests/override/kt4785.kt @@ -1,4 +1,4 @@ -trait T { +interface T { internal fun foo() } diff --git a/compiler/testData/diagnostics/tests/override/kt4785classObject.kt b/compiler/testData/diagnostics/tests/override/kt4785classObject.kt index f74c61f073a..9f62206d000 100644 --- a/compiler/testData/diagnostics/tests/override/kt4785classObject.kt +++ b/compiler/testData/diagnostics/tests/override/kt4785classObject.kt @@ -1,8 +1,8 @@ -trait A { +interface A { internal fun foo() } -trait B { +interface B { protected fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/override/kt4785delegation.kt b/compiler/testData/diagnostics/tests/override/kt4785delegation.kt index 77e944c980e..8a4d927d59e 100644 --- a/compiler/testData/diagnostics/tests/override/kt4785delegation.kt +++ b/compiler/testData/diagnostics/tests/override/kt4785delegation.kt @@ -1,8 +1,8 @@ -trait A { +interface A { internal fun foo() } -trait B { +interface B { protected fun foo() } diff --git a/compiler/testData/diagnostics/tests/override/kt880.kt b/compiler/testData/diagnostics/tests/override/kt880.kt index a8dad78b8d4..814e808b9fe 100644 --- a/compiler/testData/diagnostics/tests/override/kt880.kt +++ b/compiler/testData/diagnostics/tests/override/kt880.kt @@ -1,6 +1,6 @@ // KT-880 Overload resolution ambiguity -public trait I { +public interface I { open fun test() : Unit } diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt b/compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt index 99580fc2937..50667f7f418 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt @@ -1,8 +1,8 @@ -trait A { +interface A { fun b(a : Int) } -trait B : A {} +interface B : A {} class C1 : A { override fun b(b : Int) {} diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt b/compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt index 55eb4b013ca..1c30aadf745 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt @@ -1,14 +1,14 @@ -trait C { +interface C { fun foo(a : Int) } -trait D { +interface D { fun foo(b : Int) } -trait E : C, D +interface E : C, D -trait F : C, D { +interface F : C, D { override fun foo(a : Int) { throw UnsupportedOperationException() } diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt b/compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt index 3819cf581f9..f59a7ce622b 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt @@ -1,6 +1,6 @@ // FILE: Super.kt -trait Super { +interface Super { fun foo(superName: Int) } diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt b/compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt index ca04ebc0162..f37808091db 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt @@ -1,6 +1,6 @@ // FILE: KSuper.kt -trait KSuper { +interface KSuper { fun foo(ksuperName: Int) } diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt b/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt index e1d8929395c..4ce9afec0c8 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt @@ -6,7 +6,7 @@ interface JavaInterface { // FILE: kotlin.kt -trait KotlinTrait { +interface KotlinTrait { public fun foo(someOtherName: Int) {} } diff --git a/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt b/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt index 947dc2dbe86..46b4e945af2 100644 --- a/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt +++ b/compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt @@ -11,7 +11,7 @@ class SimpleSubclass : JavaInterface { } -trait SubtraitWithFakeOverride : JavaInterface +interface SubtraitWithFakeOverride : JavaInterface class Subclass : SubtraitWithFakeOverride { override fun foo(otherKotlinName: Int) {} diff --git a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt index 3e6f24548a3..0da7d01003c 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt @@ -12,7 +12,7 @@ public class J { import p.* -trait Out +interface Out fun f(a: Out, b: Out, c: Out): T = null!! fun out(t: T): Out> = null!! diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt index 171a9d6308d..5c998b4ecce 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt @@ -1,9 +1,9 @@ import java.util.HashMap -trait ModuleDescriptorImpl -trait ModuleInfo -trait ResolverForModule -trait ResolverForProject +interface ModuleDescriptorImpl +interface ModuleInfo +interface ResolverForModule +interface ResolverForProject class ResolverForProjectImpl( descriptorByModule: Map, diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt index 400f0c159e5..72cd6adfb41 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt @@ -1,6 +1,6 @@ import java.util.HashMap -trait ResolverForProject { +interface ResolverForProject { val exposeM: M1 get() = null!! } @@ -9,7 +9,7 @@ class ResolverForProjectImpl( delegateResolver: ResolverForProject ) : ResolverForProject -trait WithFoo { +interface WithFoo { fun foo() } diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt index 0d1be396e8d..6505d5bf312 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -trait Foo +interface Foo fun test() { var nullable: Foo? = null diff --git a/compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt b/compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt index b269d1b4a96..51d087d07ff 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt @@ -1,14 +1,14 @@ // !EXPLICIT_FLEXIBLE_TYPES // !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND -trait A -trait B: A> +interface A +interface B: A> -trait C: A, B -trait D: B, A -trait E: A, B -trait F: A, B +interface C: A, B +interface D: B, A +interface E: A, B +interface F: A, B -trait G: A, B -trait H: A, B -trait I: B, A \ No newline at end of file +interface G: A, B +interface H: A, B +interface I: B, A \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt index 48c821f00b4..6554d91e6e0 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt @@ -1,2 +1,2 @@ -trait ExtMap : Map +interface ExtMap : Map class HashMapEx : java.util.HashMap(), ExtMap \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt b/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt index 067f80d0a19..8736f3d1155 100644 --- a/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt +++ b/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt @@ -13,7 +13,7 @@ class { } -trait { +interface { } diff --git a/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt b/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt index 0f80fe99ccf..db6a738d76d 100644 --- a/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt +++ b/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt @@ -1,4 +1,4 @@ -trait Iterator { +interface Iterator { fun next() : T val hasNext : Boolean diff --git a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt index 11acf7d5ad3..633fe0e5cd0 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt @@ -1,7 +1,7 @@ package kt606_dependents //KT-1489 Code analyzer fails with assertion -trait AutoCloseable{ +interface AutoCloseable{ fun close() } diff --git a/compiler/testData/diagnostics/tests/regressions/kt174.kt b/compiler/testData/diagnostics/tests/regressions/kt174.kt index 660cb39f78e..89a926afc6b 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt174.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt174.kt @@ -1,5 +1,5 @@ // KT-174 Nullability info for extension function receivers -trait Tree {} +interface Tree {} fun Any?.TreeValue() : Tree { if (this is Tree) return this diff --git a/compiler/testData/diagnostics/tests/regressions/kt302.kt b/compiler/testData/diagnostics/tests/regressions/kt302.kt index 3f5dba1ebe0..7905dcb3ef8 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt302.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt302.kt @@ -2,11 +2,11 @@ package kt302 -trait A { +interface A { open fun foo() {} } -trait B { +interface B { open fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/regressions/kt307.kt b/compiler/testData/diagnostics/tests/regressions/kt307.kt index 3cbb585a647..4d9355d9d9f 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt307.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt307.kt @@ -4,7 +4,7 @@ open class AL { fun get(i : Int) : Any? = i } -trait ALE : AL { +interface ALE : AL { fun getOrNull(index: Int, value: T) : T { return get(index) as? T ?: value } diff --git a/compiler/testData/diagnostics/tests/regressions/kt316.kt b/compiler/testData/diagnostics/tests/regressions/kt316.kt index db9253f127b..4816e9763f5 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt316.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt316.kt @@ -1,6 +1,6 @@ // KT-316 Members of traits must be open by default -trait B { +interface B { fun bar() {} fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/regressions/kt353.kt b/compiler/testData/diagnostics/tests/regressions/kt353.kt index a6633c930fa..2ca5f2a2e29 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt353.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt353.kt @@ -1,6 +1,6 @@ // KT-353 Generic type argument inference sometimes doesn't work -trait A { +interface A { fun gen() : T } diff --git a/compiler/testData/diagnostics/tests/regressions/kt4827.kt b/compiler/testData/diagnostics/tests/regressions/kt4827.kt index e39d7a40565..17c922a7038 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt4827.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt4827.kt @@ -1,7 +1,7 @@ // KT-4827 UOE at PackageType.throwException() // EA-53605 -public trait TestInterface { +public interface TestInterface { } class C { diff --git a/compiler/testData/diagnostics/tests/regressions/kt604.kt b/compiler/testData/diagnostics/tests/regressions/kt604.kt index de0926b0208..3d2d8f8f2cd 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt604.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt604.kt @@ -1,13 +1,13 @@ // KT-604 Internal frontend error -trait ChannelPipeline { +interface ChannelPipeline { } class DefaultChannelPipeline() : ChannelPipeline { } -trait ChannelPipelineFactory{ +interface ChannelPipelineFactory{ fun getPipeline() : ChannelPipeline } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt index 229e713d50e..34e25109c11 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt @@ -8,7 +8,7 @@ fun test(foo: Foo) { } //variable as member -trait A { +interface A { val foo: Foo } @@ -22,7 +22,7 @@ fun test(a: A) { } //variable as extension -trait B { +interface B { } val B.foo: Foo get() = Foo() @@ -36,9 +36,9 @@ fun test(b: B) { } //variable as member extension -trait C +interface C -trait D { +interface D { val C.foo: Foo fun test(c: C) { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt index c3f09111379..82451afac38 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt @@ -8,7 +8,7 @@ fun test(foo: Foo) { } //variable as member -trait A { +interface A { val foo: Foo } @@ -21,7 +21,7 @@ fun test(a: A) { } //variable as extension -trait B {} +interface B {} val B.foo: Foo get() = Foo() @@ -35,9 +35,9 @@ fun test(b: B) { } //variable as member extension -trait C +interface C -trait D { +interface D { val C.foo: Foo fun test(c: C) { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt index 06425369b39..ea3d5fb4220 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt @@ -1,7 +1,7 @@ class Foo //no variable -trait A { +interface A { fun Foo.invoke() {} fun test(foo: Foo) { @@ -10,7 +10,7 @@ trait A { } //variable as member -trait B { +interface B { val foo: Foo } @@ -38,7 +38,7 @@ fun test(c: C, b: B) { //variable as extension, -trait D { +interface D { } val D.foo: Foo get() = Foo() @@ -66,9 +66,9 @@ fun test(e: E, d: D) { } //variable as member extension -trait F +interface F -trait G { +interface G { val F.foo: Foo fun Foo.invoke() @@ -92,13 +92,13 @@ fun test(g: G, f: F) { } //variable as member extension (2) -trait X +interface X -trait U { +interface U { val X.foo: Foo } -trait V { +interface V { fun Foo.invoke() {} fun U.test(x: X) { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt index 1d75d9a9f40..6957b44b076 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt @@ -1,5 +1,5 @@ -trait A -trait Foo { +interface A +interface Foo { fun A.invoke() } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt b/compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt index 3c0d7ae7326..5895e7121b7 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt @@ -11,7 +11,7 @@ enum class DOMElementTestClasses { // use case 2 -trait EnumStyleClass { +interface EnumStyleClass { fun invoke() {} } enum class TestClasses : EnumStyleClass { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt b/compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt index 548dba784c6..6ac2e1c5cbc 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt @@ -1,4 +1,4 @@ -trait A +interface A fun foo(invoke: A.()->Unit, a: A) { a.invoke() diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt index 10e8c6099fc..334cae7f974 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt @@ -1,4 +1,4 @@ -trait Foo +interface Foo class Bar { fun invoke(): Foo = throw Exception() diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt index de99dbeab71..9d8aac8a083 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt @@ -1,6 +1,6 @@ // !CHECK_TYPE -trait Inv +interface Inv fun Inv.reduce2(): S = null!! diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt index 61629d19dcf..c087d7ac479 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt @@ -1,6 +1,6 @@ package a -trait A +interface A fun doList(l: List) = l fun doInt(i: Int) = i fun getList(): List? = null diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt index 9e3669006e8..148cdc00581 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt @@ -1,6 +1,6 @@ package a -trait A +interface A fun id(t: T): T = t fun doList(l: List) = l diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt index 10772f81a8c..1764d1da8d0 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt @@ -1,11 +1,11 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -trait A -trait B +interface A +interface B -trait C: A, B -trait D: A, B -trait E: A, B +interface C: A, B +interface D: A, B +interface E: A, B fun foo(c: C?, d: D?, e: E?) { val a: A? = c ?: d ?: e diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt index 82d83383986..b7c6fc5a2c3 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt @@ -56,7 +56,7 @@ class K : H() { } //------------- -trait T { +interface T { public fun foo() {} } @@ -68,15 +68,15 @@ class M : L() { internal override fun foo() {} } //--------------- -trait R { +interface R { internal protected fun foo() {} } -trait P : R { +interface P : R { internal override fun foo() {} } -trait Q : R { +interface Q : R { protected override fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1248.kt b/compiler/testData/diagnostics/tests/scopes/kt1248.kt index fd0a7bfd2ae..d7d37268638 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1248.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1248.kt @@ -1,7 +1,7 @@ //KT-1248 Control visibility of overrides needed package kt1248 -trait ParseResult { +interface ParseResult { public val success : Boolean public val value : T } diff --git a/compiler/testData/diagnostics/tests/scopes/kt151.kt b/compiler/testData/diagnostics/tests/scopes/kt151.kt index e50bbf6526d..182c835bf31 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt151.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt151.kt @@ -19,7 +19,7 @@ open class C { internal open fun foo() {} } -trait T { +interface T { protected fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1579.kt b/compiler/testData/diagnostics/tests/scopes/kt1579.kt index bea21ba1abd..6c1ef8f6c63 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1579.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1579.kt @@ -1,8 +1,8 @@ //FILE:a.kt -//KT-1579 Can't import nested class/trait +//KT-1579 Can't import nested class/interface package lib -trait WithInner { - trait Inner { +interface WithInner { + interface Inner { } } //FILE:b.kt diff --git a/compiler/testData/diagnostics/tests/scopes/kt1580.kt b/compiler/testData/diagnostics/tests/scopes/kt1580.kt index f28d9e83456..a0775c494fb 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1580.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1580.kt @@ -1,8 +1,8 @@ //FILE:a.kt -//KT-1580 Can't access nested class/trait from other package +//KT-1580 Can't access nested class/interface from other package package lib -trait WithInner { - trait Inner { +interface WithInner { + interface Inner { } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1822.kt b/compiler/testData/diagnostics/tests/scopes/kt1822.kt index 75282544459..85a07b95ec1 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1822.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1822.kt @@ -5,7 +5,7 @@ open class C { internal open fun foo() {} } -trait T { +interface T { protected fun foo() {} } @@ -17,11 +17,11 @@ open class A { internal open fun foo() {} } -trait B { +interface B { protected fun foo() {} } -trait D { +interface D { public fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt b/compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt index 0af67217928..28db2c26a69 100644 --- a/compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt +++ b/compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt @@ -1,6 +1,6 @@ package c -trait B { +interface B { fun bar() {} } diff --git a/compiler/testData/diagnostics/tests/scopes/visibility.kt b/compiler/testData/diagnostics/tests/scopes/visibility.kt index e7069c4be8d..b20b2763ad6 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility.kt +++ b/compiler/testData/diagnostics/tests/scopes/visibility.kt @@ -2,7 +2,7 @@ package test_visibility protected class ProtectedClass -protected trait ProtectedTrait +protected interface ProtectedTrait protected val protected_val : Int = 4 protected fun protected_fun() {} @@ -42,7 +42,7 @@ fun test3(a: A) { a.f(0, 1) //todo .bMethod() } -trait T +interface T open class C : T { protected var i : Int = 34 diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt index d7825e8687f..aa6be73d7e4 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt @@ -1,3 +1,3 @@ -trait A { +interface A { constructor() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt index 8163abc6ef4..7e25869a417 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt @@ -1,4 +1,4 @@ -trait A +interface A class AImpl : A class B : A by AImpl() { diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt index 83d0dd91591..7b5fe15c5e8 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt @@ -1,6 +1,6 @@ open class B -trait C -trait D +interface C +interface D class A : C, B, D { constructor() } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt index f8c63832afd..3609fa8a6d4 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt @@ -3,7 +3,7 @@ open class B(x: Double) { constructor(x: Int): this(1.0) constructor(x: String): this(1.0) } -trait C +interface C class A : B, C { constructor(): super(' ') constructor(x: Int) diff --git a/compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt b/compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt index fdb1e785cb5..94778fe7ac0 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt @@ -7,7 +7,7 @@ fun dispatch(request: Request) { } } -trait Request { +interface Request { fun getRequestURI(): String? fun getMethod(): String? } diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt index f7a08cacea8..d8ee70a052b 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt @@ -8,9 +8,9 @@ fun two(u: T, v: T): T = u fun three(a: T, b: T, c: T): T = c -trait A -trait B: A -trait C: A +interface A +interface B: A +interface C: A fun test(a: A, b: B, c: C) { if (a is B && a is C) { diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt index 98f3a0c5c9a..0be198177d7 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt @@ -1,9 +1,9 @@ -trait PsiElement { +interface PsiElement { fun getText(): String fun getParent(): PsiElement } -trait JetExpression : PsiElement +interface JetExpression : PsiElement fun foo1(e: PsiElement) { var current: PsiElement? = e diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt index cd8185a85d6..71f2c591f58 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt @@ -1,7 +1,7 @@ //KT-4403 Wrong "type mismatch" on smart cast with inference -trait A -trait B : A +interface A +interface B : A fun T.f(): T = this diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt index 7335640eb12..cced68127f8 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt @@ -1,6 +1,6 @@ //KT-4415 Class Auto-Cast Bug -trait SelfJson +interface SelfJson object A { fun find(clz:Class<*>){ } diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt index c91ed164bc8..99427844d31 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt @@ -1,5 +1,5 @@ -trait A -trait B +interface A +interface B class Test { fun test(a: A?, b: B, list: MutableList>) { diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt3572.kt b/compiler/testData/diagnostics/tests/smartCasts/kt3572.kt index bbc0f322f75..fc792d1ca81 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt3572.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt3572.kt @@ -1,4 +1,4 @@ -trait Printer { +interface Printer { fun print() } diff --git a/compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt b/compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt index 0379d2af41c..e561417654d 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt @@ -1,4 +1,4 @@ -public trait A { +public interface A { public val x: Any } diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt index 429a34e22c4..84dbc6bce2e 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun ok(): Boolean } diff --git a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt index dc7de4f934f..05ac2b406ef 100644 --- a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt +++ b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt @@ -1,6 +1,6 @@ // !CHECK_TYPE -trait A> { +interface A> { fun r(): R fun t(): T } @@ -10,7 +10,7 @@ fun testA(a: A<*, *>) { a.t().checkType { _>() } } -trait B, T>> { +interface B, T>> { fun r(): R fun t(): T } diff --git a/compiler/testData/diagnostics/tests/subtyping/kt2069.kt b/compiler/testData/diagnostics/tests/subtyping/kt2069.kt index 80fb566a259..c2c70d7bcb8 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt2069.kt +++ b/compiler/testData/diagnostics/tests/subtyping/kt2069.kt @@ -1,7 +1,7 @@ //KT-2069 Cannot call super method when superclass has type parameters package kt2069 -trait T1 { +interface T1 { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/subtyping/kt3159.kt b/compiler/testData/diagnostics/tests/subtyping/kt3159.kt index a72f45f25e1..6f85c700263 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt3159.kt +++ b/compiler/testData/diagnostics/tests/subtyping/kt3159.kt @@ -1,4 +1,4 @@ -trait Super { +interface Super { var v: CharSequence val v2: CharSequence } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt b/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt index b35d6be9238..db35d1b96c8 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt @@ -1,6 +1,6 @@ package example -trait T { +interface T { fun foo() {} } open class C() { @@ -42,7 +42,7 @@ class A() : C(), T { } } -trait G { +interface G { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt b/compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt index 52dcd4e77da..c9565beb36d 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt @@ -2,7 +2,7 @@ open class A { open fun foo() {} } -trait ATrait : A { +interface ATrait : A { override fun foo() { super.foo() diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt b/compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt index 8876f572337..c89681277bf 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt @@ -1,4 +1,4 @@ -trait Base { +interface Base { fun foo() } val String.test: Base = object: Base { diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt b/compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt index 297cb817b14..11485e6d46e 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt @@ -1,12 +1,12 @@ // FILE: test.kt -public trait Test { +public interface Test { fun test(): String { return "123"; } } -trait KTrait : Test { +interface KTrait : Test { fun ktest() { super.test() diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/abstractClass.kt b/compiler/testData/diagnostics/tests/traitWithRequired/abstractClass.kt index 9d692f9770a..1b1c68bf368 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/abstractClass.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/abstractClass.kt @@ -1,6 +1,6 @@ open class Required -trait Trait : Required +interface Trait : Required abstract class Abstract : Trait diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/anonymousObjectExtendsTraitWithRequired.kt b/compiler/testData/diagnostics/tests/traitWithRequired/anonymousObjectExtendsTraitWithRequired.kt index 526735148e5..2be1de89415 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/anonymousObjectExtendsTraitWithRequired.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/anonymousObjectExtendsTraitWithRequired.kt @@ -1,6 +1,6 @@ open class Required -trait A : Required +interface A : Required val a = object : A {} val b: A = object : A, Required() {} diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/differentGenericArguments.kt b/compiler/testData/diagnostics/tests/traitWithRequired/differentGenericArguments.kt index 07219c7e9e0..ab90db2cd01 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/differentGenericArguments.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/differentGenericArguments.kt @@ -1,8 +1,8 @@ open class Generic -trait A : Generic +interface A : Generic -trait B : Generic +interface B : Generic class Y : A, B class Z : A, B, Generic() diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/kt3006.kt b/compiler/testData/diagnostics/tests/traitWithRequired/kt3006.kt index af94dbd8859..426c86fda20 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/kt3006.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/kt3006.kt @@ -1,7 +1,7 @@ open class Base { } -trait Derived: Base { +interface Derived: Base { fun foo() { f1(this@Derived) } diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/manyRequirementsDisallowed.kt b/compiler/testData/diagnostics/tests/traitWithRequired/manyRequirementsDisallowed.kt index 9b665610693..7c8060832e7 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/manyRequirementsDisallowed.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/manyRequirementsDisallowed.kt @@ -1,4 +1,4 @@ open class A open class B -trait C : A, B \ No newline at end of file +interface C : A, B \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/manyTraitsRequireSameClass.kt b/compiler/testData/diagnostics/tests/traitWithRequired/manyTraitsRequireSameClass.kt index 31275536e00..693178cab97 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/manyTraitsRequireSameClass.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/manyTraitsRequireSameClass.kt @@ -1,12 +1,12 @@ open class Required -trait A : Required +interface A : Required -trait B : A, Required +interface B : A, Required -trait C : Required +interface C : Required -trait D : B, Required +interface D : B, Required class W : D class X : D, Required() diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/requirementFulfilledBySubclass.kt b/compiler/testData/diagnostics/tests/traitWithRequired/requirementFulfilledBySubclass.kt index 0199b50f515..99cea06bcfc 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/requirementFulfilledBySubclass.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/requirementFulfilledBySubclass.kt @@ -1,6 +1,6 @@ open class RequiredBase -trait Trait : RequiredBase +interface Trait : RequiredBase open class RequiredDerived : RequiredBase() diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/traitExtendsTraitWithRequired.kt b/compiler/testData/diagnostics/tests/traitWithRequired/traitExtendsTraitWithRequired.kt index 500ac2773c7..b771f2d842b 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/traitExtendsTraitWithRequired.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/traitExtendsTraitWithRequired.kt @@ -1,8 +1,8 @@ open class Required(val value: String) -trait First : Required +interface First : Required -trait Second : First +interface Second : First class Y : Second class Z : Second, Required(":o)") diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt b/compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt index 530eeb6df11..8f65d3eddf9 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt @@ -1,4 +1,4 @@ -trait AnyTrait : Any +interface AnyTrait : Any class Foo : AnyTrait diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt b/compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt index 78e8dd956e9..219d5b6ff57 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt @@ -1,9 +1,9 @@ open class bar() -trait Foo() : bar(), bar, bar { +interface Foo() : bar(), bar, bar { } -trait Foo2 : bar, Foo { +interface Foo2 : bar, Foo { } open class Foo1() : bar(), bar, Foo, Foo() {} diff --git a/compiler/testData/diagnostics/tests/traitWithRequired/uninheritableTraitDifferentGenericArguments.kt b/compiler/testData/diagnostics/tests/traitWithRequired/uninheritableTraitDifferentGenericArguments.kt index 3d6e92afd39..d9788d49103 100644 --- a/compiler/testData/diagnostics/tests/traitWithRequired/uninheritableTraitDifferentGenericArguments.kt +++ b/compiler/testData/diagnostics/tests/traitWithRequired/uninheritableTraitDifferentGenericArguments.kt @@ -1,7 +1,7 @@ open class Generic -trait A : Generic +interface A : Generic -trait B : Generic +interface B : Generic -trait C : A, B +interface C : A, B diff --git a/compiler/testData/diagnostics/tests/variance/Class.kt b/compiler/testData/diagnostics/tests/variance/Class.kt index 0f1ed851ea8..5bd90ac9c06 100644 --- a/compiler/testData/diagnostics/tests/variance/Class.kt +++ b/compiler/testData/diagnostics/tests/variance/Class.kt @@ -1,18 +1,18 @@ -trait In -trait Out -trait Inv +interface In +interface Out +interface Inv -trait TypeBounds1I> -trait TypeBounds2 -trait TypeBounds3 -trait TypeBounds4> -trait TypeBounds5)!>O>> +interface TypeBounds1I> +interface TypeBounds2 +interface TypeBounds3 +interface TypeBounds4> +interface TypeBounds5)!>O>> -trait WhereTypeBounds1 where X : I -trait WhereTypeBounds2 where X : O -trait WhereTypeBounds3 where X : P -trait WhereTypeBounds4 where X : In -trait WhereTypeBounds5 where X : In<)!>O> +interface WhereTypeBounds1 where X : I +interface WhereTypeBounds2 where X : O +interface WhereTypeBounds3 where X : P +interface WhereTypeBounds4 where X : In +interface WhereTypeBounds5 where X : In<)!>O> class SubClass1 : Out<)!>I> class SubClass2 : Out diff --git a/compiler/testData/diagnostics/tests/variance/Function.kt b/compiler/testData/diagnostics/tests/variance/Function.kt index 6759027da40..9d008952063 100644 --- a/compiler/testData/diagnostics/tests/variance/Function.kt +++ b/compiler/testData/diagnostics/tests/variance/Function.kt @@ -1,9 +1,9 @@ -trait In -trait Out -trait Inv +interface In +interface Out +interface Inv fun getT(): T = null!! -trait Test { +interface Test { fun parameters1(i: I, o: O, p: P) fun parameters2(i: In<)!>I>) fun parameters3(i: In) diff --git a/compiler/testData/diagnostics/tests/variance/FunctionTypes.kt b/compiler/testData/diagnostics/tests/variance/FunctionTypes.kt index e36928a1330..87418e61ed0 100644 --- a/compiler/testData/diagnostics/tests/variance/FunctionTypes.kt +++ b/compiler/testData/diagnostics/tests/variance/FunctionTypes.kt @@ -1,7 +1,7 @@ -trait In +interface In fun getT(): T = null!! -trait Test { +interface Test { fun ok1(i: (O) -> I) : (I) -> O fun ok2(i: (P) -> P) : (P) -> P fun ok3(i: (In) -> In) = getT<(In) -> In>() diff --git a/compiler/testData/diagnostics/tests/variance/InPosition.kt b/compiler/testData/diagnostics/tests/variance/InPosition.kt index 403ee306bb0..550b0f0fc1b 100644 --- a/compiler/testData/diagnostics/tests/variance/InPosition.kt +++ b/compiler/testData/diagnostics/tests/variance/InPosition.kt @@ -1,9 +1,9 @@ -trait In -trait Out -trait Inv -trait Pair +interface In +interface Out +interface Inv +interface Pair -trait Test { +interface Test { fun ok1(i: I) fun ok2(i: In) fun ok3(i: In>) diff --git a/compiler/testData/diagnostics/tests/variance/InvariantPosition.kt b/compiler/testData/diagnostics/tests/variance/InvariantPosition.kt index 96dd46da951..96c60aea28f 100644 --- a/compiler/testData/diagnostics/tests/variance/InvariantPosition.kt +++ b/compiler/testData/diagnostics/tests/variance/InvariantPosition.kt @@ -1,9 +1,9 @@ -trait In -trait Out -trait Inv -trait Pair +interface In +interface Out +interface Inv +interface Pair -trait Test { +interface Test { var ok1: Inv

var ok2: P var ok3: Out> diff --git a/compiler/testData/diagnostics/tests/variance/NullableTypes.kt b/compiler/testData/diagnostics/tests/variance/NullableTypes.kt index 1321ba9926c..2f0df3a258b 100644 --- a/compiler/testData/diagnostics/tests/variance/NullableTypes.kt +++ b/compiler/testData/diagnostics/tests/variance/NullableTypes.kt @@ -1,10 +1,10 @@ -trait In -trait Out -trait Inv

+interface In +interface Out +interface Inv

fun getT(): T = null!! -trait Test { +interface Test { fun ok1(i: I?) : O? fun ok2(i: In?) : Out? fun ok3(i: Inv) = getT>() diff --git a/compiler/testData/diagnostics/tests/variance/OutPosition.kt b/compiler/testData/diagnostics/tests/variance/OutPosition.kt index e07933736fe..000dbc57291 100644 --- a/compiler/testData/diagnostics/tests/variance/OutPosition.kt +++ b/compiler/testData/diagnostics/tests/variance/OutPosition.kt @@ -1,9 +1,9 @@ -trait In -trait Out -trait Inv -trait Pair +interface In +interface Out +interface Inv +interface Pair -trait Test { +interface Test { fun ok1(): O fun ok2(): In fun ok3(): In> diff --git a/compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt b/compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt index 32192a50558..a601fb7987b 100644 --- a/compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt +++ b/compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt @@ -1,6 +1,6 @@ -trait In -trait Out -trait Inv +interface In +interface Out +interface Inv fun getT(): T = null!! diff --git a/compiler/testData/diagnostics/tests/variance/ValProperty.kt b/compiler/testData/diagnostics/tests/variance/ValProperty.kt index 2699705866a..206c78f1220 100644 --- a/compiler/testData/diagnostics/tests/variance/ValProperty.kt +++ b/compiler/testData/diagnostics/tests/variance/ValProperty.kt @@ -1,6 +1,6 @@ -trait In -trait Out -trait Inv +interface In +interface Out +interface Inv class Delegate { fun get(t: Any, p: PropertyMetadata): T = null!! diff --git a/compiler/testData/diagnostics/tests/variance/VarProperty.kt b/compiler/testData/diagnostics/tests/variance/VarProperty.kt index 5e8812c2c0b..dedb3307d46 100644 --- a/compiler/testData/diagnostics/tests/variance/VarProperty.kt +++ b/compiler/testData/diagnostics/tests/variance/VarProperty.kt @@ -1,6 +1,6 @@ -trait In -trait Out -trait Inv +interface In +interface Out +interface Inv class Delegate { fun get(t: Any, p: PropertyMetadata): T = null!! diff --git a/compiler/testData/diagnostics/tests/variance/Visibility.kt b/compiler/testData/diagnostics/tests/variance/Visibility.kt index cee2c4a1b72..55d8c56afe0 100644 --- a/compiler/testData/diagnostics/tests/variance/Visibility.kt +++ b/compiler/testData/diagnostics/tests/variance/Visibility.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { val internal_val: I public val public_val: I protected val protected_val: I diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/Trait.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/Trait.kt index cc19666ccdb..3e72d50861e 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/Trait.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/Trait.kt @@ -1,4 +1,4 @@ -internal trait Test { +internal interface Test { private/*private to this*/ final fun foo(): I { throw Exception() } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt index bf23d780a78..b21ee696104 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt @@ -1,4 +1,4 @@ -trait Tr { +interface Tr { fun foo() } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt index 894e20bb58b..195c6108764 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt @@ -3,7 +3,7 @@ fun foo(t1: T, t2: T): T = t1 -trait Tr +interface Tr class C: Tr fun foo1(t1: T, t2: T): T = t1 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt index d372b4a2b58..53a745600b0 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt @@ -1,18 +1,18 @@ -trait P -trait R +interface P +interface R -trait A { +interface A { fun foo(p: P): R fun dynamic(p: dynamic): dynamic } -trait B : A { +interface B : A { override fun foo(p: dynamic): dynamic override fun dynamic(p: P): R } -trait A1 { +interface A1 { fun foo(p: dynamic): dynamic } -trait C : A, A1 \ No newline at end of file +interface C : A, A1 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt index 267e111d84e..5153971a2bd 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt @@ -1,4 +1,4 @@ -trait Tr : dynamic +interface Tr : dynamic fun dynamic> foo() {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt index 5aaac4d22ca..2d56b6fc0ae 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt @@ -17,7 +17,7 @@ native fun String.bar(): Int = noImpl native -trait T { +interface T { val baz: Int fun foo() diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt index 013d2ca2bdd..a24f4ef62a9 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt @@ -5,7 +5,7 @@ fun String.bar(n: Int): Int? = noImpl native -trait T { +interface T { nativeGetter fun foo(d: Double): String? nativeGetter diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt index 4b421b320df..caafd08d4de 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt @@ -3,10 +3,10 @@ fun foo() { class A { inner class E { - trait T + interface T } } - trait T { + interface T { } } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt index a4e17120965..95715883076 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt @@ -4,8 +4,8 @@ class A { inner class D - trait T { - trait A + interface T { + interface A class B } @@ -14,8 +14,8 @@ class A { inner class I - trait T { - trait A + interface T { + interface A class B companion object {} @@ -30,22 +30,22 @@ class A { companion object {} } -trait T { +interface T { class B { class C inner class D - trait T { - trait A + interface T { + interface A class B } companion object {} } - trait T { - trait A + interface T { + interface A class B companion object {} @@ -68,8 +68,8 @@ enum class E { inner class D - trait T { - trait A + interface T { + interface A class B } @@ -78,8 +78,8 @@ enum class E { inner class I - trait T { - trait A + interface T { + interface A class B companion object {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt index 2d72d8da6ad..47403afbd7e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt @@ -1,4 +1,4 @@ -trait T { +interface T { @kotlin.jvm.overloads fun foo(s: String = "OK") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt index f5dfa1a51dd..432e89e7508 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt @@ -27,7 +27,7 @@ class A { } } -trait B { +interface B { companion object { platformStatic fun a1() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/abstractClassConstructors.kt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/abstractClassConstructors.kt index d64483c26b0..9afebc524cc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/abstractClassConstructors.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/abstractClassConstructors.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION -trait A +interface A abstract class B annotation class C enum class D diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/property/abstractPropertyViaSubclasses.kt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/property/abstractPropertyViaSubclasses.kt index 1c7924844a1..0f5adfb8e4b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/property/abstractPropertyViaSubclasses.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/property/abstractPropertyViaSubclasses.kt @@ -2,7 +2,7 @@ import kotlin.reflect.KMemberProperty -trait Base { +interface Base { val x: Any } diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/override.kt b/compiler/testData/diagnostics/testsWithStdLib/native/override.kt index 262ed68555a..57ab03f7b76 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/override.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/override.kt @@ -1,6 +1,6 @@ import kotlin.jvm.* -trait Base { +interface Base { fun foo() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt b/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt index e312f88ad3c..c318b5b2350 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt @@ -1,6 +1,6 @@ import kotlin.jvm.* -trait Tr { +interface Tr { native fun foo() native fun bar() {} diff --git a/compiler/testData/evaluate/constant/classObjectProperty.kt b/compiler/testData/evaluate/constant/classObjectProperty.kt index b44b2fa3450..f541f11805f 100644 --- a/compiler/testData/evaluate/constant/classObjectProperty.kt +++ b/compiler/testData/evaluate/constant/classObjectProperty.kt @@ -44,6 +44,6 @@ fun foo() { } } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/finalProperty.kt b/compiler/testData/evaluate/constant/finalProperty.kt index 74c23ffa565..fb1c28c70f3 100644 --- a/compiler/testData/evaluate/constant/finalProperty.kt +++ b/compiler/testData/evaluate/constant/finalProperty.kt @@ -50,6 +50,6 @@ fun foo() { val prop8 = A().a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/localVal.kt b/compiler/testData/evaluate/constant/localVal.kt index fb86944ab89..9c5cbf1febf 100644 --- a/compiler/testData/evaluate/constant/localVal.kt +++ b/compiler/testData/evaluate/constant/localVal.kt @@ -48,6 +48,6 @@ fun foo() { val prop8 = a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/localVar.kt b/compiler/testData/evaluate/constant/localVar.kt index a607b8a6172..5b8a2688f99 100644 --- a/compiler/testData/evaluate/constant/localVar.kt +++ b/compiler/testData/evaluate/constant/localVar.kt @@ -48,6 +48,6 @@ fun foo() { val prop8 = a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/nonFinalProperty.kt b/compiler/testData/evaluate/constant/nonFinalProperty.kt index 41f11e20855..78035a28a04 100644 --- a/compiler/testData/evaluate/constant/nonFinalProperty.kt +++ b/compiler/testData/evaluate/constant/nonFinalProperty.kt @@ -51,6 +51,6 @@ fun foo() { val prop8 = A().a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/objectProperty.kt b/compiler/testData/evaluate/constant/objectProperty.kt index 83e55f2c15d..6132aecda7c 100644 --- a/compiler/testData/evaluate/constant/objectProperty.kt +++ b/compiler/testData/evaluate/constant/objectProperty.kt @@ -43,6 +43,6 @@ fun foo() { } } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/topLevelVal.kt b/compiler/testData/evaluate/constant/topLevelVal.kt index 602dcbdfa88..29a0a0105f5 100644 --- a/compiler/testData/evaluate/constant/topLevelVal.kt +++ b/compiler/testData/evaluate/constant/topLevelVal.kt @@ -42,6 +42,6 @@ fun foo() { val prop6 = a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/evaluate/constant/topLevelVar.kt b/compiler/testData/evaluate/constant/topLevelVar.kt index 28390177672..717d8087726 100644 --- a/compiler/testData/evaluate/constant/topLevelVar.kt +++ b/compiler/testData/evaluate/constant/topLevelVar.kt @@ -42,6 +42,6 @@ fun foo() { val prop6 = a + 1 } -trait Foo { +interface Foo { fun f() } \ No newline at end of file diff --git a/compiler/testData/integration/ant/js/suppressWarnings/root1/foo.kt b/compiler/testData/integration/ant/js/suppressWarnings/root1/foo.kt index b97b1e74260..46efcd61cca 100644 --- a/compiler/testData/integration/ant/js/suppressWarnings/root1/foo.kt +++ b/compiler/testData/integration/ant/js/suppressWarnings/root1/foo.kt @@ -7,7 +7,7 @@ fun foo(p: Int??) { } -trait T { +interface T { abstract fun foo() } diff --git a/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt b/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt index 17ad0702849..3aa467c4ea8 100644 --- a/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt +++ b/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt @@ -4,7 +4,7 @@ fun foo(p: Int??) { } -trait T { +interface T { abstract fun foo() } diff --git a/compiler/testData/lineNumber/trait.kt b/compiler/testData/lineNumber/trait.kt index 935f56ab7ed..f0a8880d08c 100644 --- a/compiler/testData/lineNumber/trait.kt +++ b/compiler/testData/lineNumber/trait.kt @@ -1,4 +1,4 @@ -trait A { +interface A { fun foo() = test.lineNumber() fun bar(): Int { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt index c2f78f22e6f..5d51003f956 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt @@ -3,7 +3,7 @@ package test annotation class Anno(val s: String) -trait T { +interface T { Anno("foo") fun foo(): Array>> diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt index a4ffcb65b13..53410070168 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt @@ -3,6 +3,6 @@ package test annotation class Anno -trait Trait { +interface Trait { fun foo([Anno] x: String) = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt index 4b3be4fdcc7..f0b91434720 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - trait Trait { + interface Trait { [Anno] val property: Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt index 0454006a9cd..5d238dffc50 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt @@ -2,6 +2,6 @@ package test annotation class Anno -trait Trait { +interface Trait { [Anno] val property: Int } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt index 2d2b2025b92..2a4491fcca5 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt @@ -2,7 +2,7 @@ package test annotation class Anno -trait Trait { +interface Trait { companion object { [Anno] val property: Int get() = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt index c45d2c81be0..3ae0a3d9b3b 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt @@ -3,7 +3,7 @@ package test class ConstructorTypeParamClassObjectTypeConflict { companion object { - trait test + interface test } val some: test? = throw Exception() diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt b/compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt index e28efeedca1..9f333a018b0 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt @@ -1,5 +1,5 @@ package test -trait TraitWithP

+interface TraitWithP

class ClassParamReferencesSelf> diff --git a/compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt b/compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt index b5a3fe15d2f..517e8f1236d 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt @@ -1,7 +1,7 @@ //ALLOW_AST_ACCESS package test -public trait A { +public interface A { fun bar(): T fun foo(): T = bar() } diff --git a/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt b/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt index 1fcc3c569f1..57153118418 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt @@ -1,6 +1,6 @@ package test -trait Trait { +interface Trait { open fun f(a: String) { } } diff --git a/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt b/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt index 027afdd15e8..25ee354d44c 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt @@ -1,5 +1,5 @@ package test -trait Aaa

+interface Aaa

class Bbb() : Aaa diff --git a/compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt b/compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt index 9dedca787dc..35f21b2c562 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt @@ -1,10 +1,10 @@ //ALLOW_AST_ACCESS package test -trait Rec> { +interface Rec> { fun t(): T } -trait Super { +interface Super { fun foo(p: Rec<*, *>) = p.t() } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt b/compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt index 71f52f15c73..aa3e2b5e6b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt @@ -1,5 +1,5 @@ package test -public trait SingleAbstractMethod { +public interface SingleAbstractMethod { fun foo() } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/class/Trait.kt b/compiler/testData/loadJava/compiledKotlin/class/Trait.kt index 100e972734f..f3bfbf4e89f 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/Trait.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/Trait.kt @@ -1,3 +1,3 @@ package test -trait Trtrtr +interface Trtrtr diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt index c973107933b..46bf946b2f0 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt @@ -1,6 +1,6 @@ package test -public trait JavaBeanAbstractGetter { +public interface JavaBeanAbstractGetter { //final val red: Int public abstract fun getRed(): Int //final val blue: Int diff --git a/compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt b/compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt index 4b0dcb7b986..2eab00c8bb5 100644 --- a/compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt +++ b/compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt @@ -2,7 +2,7 @@ package test // test composed from KT-2193 -trait A { +interface A { open fun f(): String = "test" } diff --git a/compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt b/compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt index d906faa3f09..da2fd30a122 100644 --- a/compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt +++ b/compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt @@ -2,6 +2,6 @@ package test -trait A { +interface A { final fun f(): String = "test" } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt b/compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt index 719deb93964..42325b99188 100644 --- a/compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt +++ b/compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt @@ -2,6 +2,6 @@ package test -trait A { +interface A { fun f(): String = "test" } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt index 29271b710be..a88eb812216 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt @@ -1,6 +1,6 @@ package test -trait Bbb +interface Bbb class ClassObjectextendsTrait { companion object : Bbb { diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt index b1c7808e9d3..142134b0c38 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt @@ -1,6 +1,6 @@ package test -trait Bbb

+interface Bbb

class ClassObjectExtendsTraitWithTP { companion object : Bbb { diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt index 0e5081cf714..7602c61fcb8 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt @@ -1,6 +1,6 @@ package test -trait T { +interface T { fun foo(): Int } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt index 8c3c948b699..72e1cef42a9 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt @@ -1,7 +1,7 @@ //ALLOW_AST_ACCESS package test -trait Test { +interface Test { companion object { diff --git a/compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt b/compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt index 6d89bdebdbf..baf01776b15 100644 --- a/compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt +++ b/compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt @@ -8,7 +8,7 @@ enum class Enum { class Nested - trait Trait + interface Trait val c: Int = 1 diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt index 6ea9f30d9f7..3b0cada48c0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt @@ -1,6 +1,6 @@ package test -trait TheTrait { +interface TheTrait { companion object { } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt index 83aa1ea2273..06bcfde5895 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt @@ -1,16 +1,16 @@ package test public class InheritMethodsDifferentReturnTypes { - public trait Super1 { + public interface Super1 { public fun foo(): CharSequence? public fun bar(): String? } - public trait Super2 { + public interface Super2 { public fun foo(): String? public fun bar(): CharSequence? } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt index 47c847a1c67..a198dff07f7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt @@ -1,16 +1,16 @@ package test public class InheritMethodsDifferentReturnTypesGeneric { - public trait Super1 { + public interface Super1 { public fun foo(): F? public fun bar(): B? } - public trait Super2 { + public interface Super2 { public fun foo(): FF? public fun bar(): BB? } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt index a30fb2d2fd4..1ecc51a10ea 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt @@ -1,6 +1,6 @@ package test -public trait RemoveRedundantProjectionKind { +public interface RemoveRedundantProjectionKind { public fun f(p0: Collection?) public fun f(p0: Comparable?) } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt index 8aa3de94956..bdd20ed84c1 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt @@ -3,5 +3,5 @@ package test public final class UnboundWildcard { public final fun foo(): MyClass<*>? = throw UnsupportedOperationException() - public trait MyClass + public interface MyClass } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt index 3277572e158..aafc90b87f7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt @@ -3,5 +3,5 @@ package test public final class StarProjection { public final fun foo(): MyClass<*> = throw UnsupportedOperationException() - public trait MyClass + public interface MyClass } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt index 71c791ad155..033131bbbc0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt @@ -1,8 +1,8 @@ package test -public trait PropagateTypeArgumentNullable { +public interface PropagateTypeArgumentNullable { - public trait Super { + public interface Super { public fun outS(p: List) public fun invOutS(p : MutableList>) @@ -15,7 +15,7 @@ public trait PropagateTypeArgumentNullable { } - public trait Sub: Super { + public interface Sub: Super { override fun outS(p: List) override fun invOutS(p : MutableList>) diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt index ee8a934352e..5759ec597fe 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt @@ -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) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: MutableList) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt index 405b1c1b0ae..83b0097586b 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt @@ -1,14 +1,14 @@ package test -public trait ChangeProjectionKind2 { +public interface ChangeProjectionKind2 { - public trait Super { + public interface Super { public fun foo(p: MutableList) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: MutableList) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt index 94ca7fb568d..3e3f9c38378 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt @@ -1,18 +1,18 @@ package test -public trait DeeplySubstitutedClassParameter { +public interface DeeplySubstitutedClassParameter { - public trait Super { + public interface Super { public fun foo(t: T) public fun dummy() // to avoid loading as SAM interface } - public trait Middle: Super { + public interface Middle: Super { override fun foo(t: E) } - public trait Sub: Middle { + public interface Sub: Middle { override fun foo(t: String) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt index f69f9d9b7ff..ecd4466cde8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt @@ -1,17 +1,17 @@ package test -public trait DeeplySubstitutedClassParameter2 { +public interface DeeplySubstitutedClassParameter2 { - public trait Super { + public interface Super { public fun foo(t: T) public fun dummy() // to avoid loading as SAM interface } - public trait Middle: Super { + public interface Middle: Super { } - public trait Sub: Middle { + public interface Sub: Middle { override fun foo(t: String) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt index b0217380f47..813702267c4 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt @@ -1,14 +1,14 @@ package test -public trait InheritMutability { +public interface InheritMutability { - public trait Super { + public interface Super { public fun foo(p: MutableList) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: MutableList) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt index d4f6fd41c22..ddd3eb4fbb6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt @@ -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?) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p0: Array?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt index aa7c450a6c4..0bc806430eb 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt @@ -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?) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p0: Array?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt index 8a35ed77855..79fa84c7728 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt @@ -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) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: Array) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt index 57b55f25b9a..de903f64e8c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt @@ -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?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt index 58f2b7dc065..d281e63e6d6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt @@ -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) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt index d5ecfe05d02..073523ed6c0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt @@ -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) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: MutableList) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt index 7b01458aae0..e2b11bc646c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt @@ -1,14 +1,14 @@ package test -public trait InheritReadOnliness { +public interface InheritReadOnliness { - public trait Super { + public interface Super { public fun foo(p: List) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: List) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt index ad89aecd444..e1c7374661a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt @@ -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?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt index 36eb9b3ed47..a8bb4d6fc81 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt @@ -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?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt index 0e364802675..6d00d885a2a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt @@ -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) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt index b2f627c8586..520a9eb2775 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt @@ -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) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt index 0d2f87aa30d..ea6378921f2 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt @@ -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 { + public interface LinkedHashMap { public fun put(key: K, value: V): V? public fun dummy() // to avoid loading as SAM interface } - public trait BasicBSONObject : LinkedHashMap, BSONObject { + public interface BasicBSONObject : LinkedHashMap, BSONObject { override fun put(key: String, value: Any): Any? } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt index ac5d13e7a1c..41f5e55735e 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt @@ -1,14 +1,14 @@ package test -public trait MutableToReadOnly { +public interface MutableToReadOnly { - public trait Super { + public interface Super { public fun foo(p: MutableList) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: MutableList) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt index 0c7f45ed64d..53e423decc1 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt @@ -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) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt index 924682611f0..b49a39243f8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt @@ -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?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt index cf11f06dedf..7fc8c9823c8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt @@ -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?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt index 3e74342628f..627f4df7991 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt @@ -1,14 +1,14 @@ package test -public trait OverrideWithErasedParameter { +public interface OverrideWithErasedParameter { - public trait Super { + public interface Super { public fun foo(p0: T?) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p0: T?) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt index 1f6e29bc233..e142671e6b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt @@ -1,14 +1,14 @@ package test -public trait ReadOnlyToMutable { +public interface ReadOnlyToMutable { - public trait Super { + public interface Super { public fun foo(p: List) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(p: List) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt index ff273173e02..8a5cdb1db32 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt @@ -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 { + public interface Generic { public fun foo(key: T) public fun dummy() // to avoid loading as SAM interface } - public trait Sub : NonGeneric, Generic { + public interface Sub : NonGeneric, Generic { override fun foo(key: String) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt index cd9732d60e0..79ef8cc0e35 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt @@ -1,14 +1,14 @@ package test -public trait SubstitutedClassParameter { +public interface SubstitutedClassParameter { - public trait Super { + public interface Super { public fun foo(t: T) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(t: String) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt index 6a1d0abe309..85321bba64e 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt @@ -1,20 +1,20 @@ package test -public trait SubstitutedClassParameters { +public interface SubstitutedClassParameters { - public trait Super1 { + public interface Super1 { public fun foo(t: T) public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(t: E) public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(t: String) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt index 3788f264811..b75f2459d36 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt @@ -1,14 +1,14 @@ package test -public trait AddNotNullJavaSubtype { +public interface AddNotNullJavaSubtype { - public trait Super { + public interface Super { public fun foo(): CharSequence? public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt index 216c9d16883..7a9d4d310e4 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt @@ -1,14 +1,14 @@ package test -public trait AddNotNullSameJavaType { +public interface AddNotNullSameJavaType { - public trait Super { + public interface Super { public fun foo(): CharSequence? public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): CharSequence } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt index ad181b72234..845e69f7db0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt @@ -1,14 +1,14 @@ package test -public trait AddNullabilityJavaSubtype { +public interface AddNullabilityJavaSubtype { - public trait Super { + public interface Super { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt index 31d3673d134..be0ba649599 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt @@ -1,14 +1,14 @@ package test -public trait AddNullabilitySameGenericType1 { +public interface AddNullabilitySameGenericType1 { - public trait Super { + public interface Super { public fun foo(): MutableList public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt index eafbf6d76e6..2503019c921 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt @@ -1,14 +1,14 @@ package test -public trait AddNullabilitySameGenericType2 { +public interface AddNullabilitySameGenericType2 { - public trait Super { + public interface Super { public fun foo(): MutableList public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt index 34716b6de79..846a400fff8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt @@ -1,14 +1,14 @@ package test -public trait AddNullabilitySameJavaType { +public interface AddNullabilitySameJavaType { - public trait Super { + public interface Super { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): CharSequence } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt index 3c4b1e6e788..5749bf66543 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt @@ -1,14 +1,14 @@ package test -public trait CantMakeImmutableInSubclass { +public interface CantMakeImmutableInSubclass { - public trait Super { + public interface Super { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt index 38985e9013c..4e3cedd56ed 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt @@ -1,18 +1,18 @@ package test -public trait DeeplySubstitutedClassParameter { +public interface DeeplySubstitutedClassParameter { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Middle: Super { + public interface Middle: Super { override fun foo(): E } - public trait Sub: Middle { + public interface Sub: Middle { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt index a1ec7f4b73f..d3203fefb8e 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt @@ -1,17 +1,17 @@ package test -public trait DeeplySubstitutedClassParameter2 { +public interface DeeplySubstitutedClassParameter2 { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Middle: Super { + public interface Middle: Super { } - public trait Sub: Middle { + public interface Sub: Middle { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt index 4e9c0968e64..833add25e23 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt @@ -1,16 +1,16 @@ package test -public trait HalfSubstitutedTypeParameters { +public interface HalfSubstitutedTypeParameters { - public trait TrickyList: MutableList {} + public interface TrickyList: MutableList {} - public trait Super { + public interface Super { public fun foo(): MutableList public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): TrickyList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt index a0ef6f5b9be..47ceaf41ea1 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt @@ -1,14 +1,14 @@ package test -public trait InheritNullabilityGenericSubclassSimple { +public interface InheritNullabilityGenericSubclassSimple { - public trait Super { + public interface Super { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt index 502952f0788..94669946df5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt @@ -1,14 +1,14 @@ package test -public trait InheritNullabilityJavaSubtype { +public interface InheritNullabilityJavaSubtype { - public trait Super { + public interface Super { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt index 172b9e626df..52e229cdca1 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt @@ -1,14 +1,14 @@ package test -public trait InheritNullabilitySameGenericType { +public interface InheritNullabilitySameGenericType { - public trait Super { + public interface Super { public fun foo(): MutableList public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt index de5f4f4a73d..5039ec73cf9 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt @@ -1,14 +1,14 @@ package test -public trait InheritNullabilitySameJavaType { +public interface InheritNullabilitySameJavaType { - public trait Super { + public interface Super { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): CharSequence } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt index cc1cce6d917..98b09b7b7ae 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt @@ -1,15 +1,15 @@ //ALLOW_AST_ACCESS package test -public trait InheritProjectionKind { +public interface InheritProjectionKind { - public trait Super { + public interface Super { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt index 22c40fff363..1668ade67f7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt @@ -1,14 +1,14 @@ package test -public trait InheritReadOnlinessOfArgument { +public interface InheritReadOnlinessOfArgument { - public trait Super { + public interface Super { public fun foo(): List> public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): List> } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt index a2aa64cb5ea..1dcdbf6ef8f 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt @@ -1,14 +1,14 @@ package test -public trait InheritReadOnlinessSameClass { +public interface InheritReadOnlinessSameClass { - public trait Super { + public interface Super { public fun foo(): List public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): List } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt index ff1baea0afa..4431b54d18a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt @@ -1,14 +1,14 @@ package test -public trait InheritReadOnlinessSubclass { +public interface InheritReadOnlinessSubclass { - public trait Super { + public interface Super { public fun foo(): Collection public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): List } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt index ab2adb2f3e3..6be64670886 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt @@ -1,15 +1,15 @@ //ALLOW_AST_ACCESS package test -public trait SameProjectionKind { +public interface SameProjectionKind { - public trait Super { + public interface Super { public fun foo(): MutableCollection? public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): MutableCollection? } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt index afa037d4568..051a5121c22 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt @@ -1,20 +1,20 @@ package test -public trait SubclassFromGenericAndNot { +public interface SubclassFromGenericAndNot { - public trait NonGeneric { + public interface NonGeneric { public fun foo(): String? public fun dummy() // to avoid loading as SAM interface } - public trait Generic { + public interface Generic { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Sub : NonGeneric, Generic { + public interface Sub : NonGeneric, Generic { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt index d4159b0dd5d..891dfb4eb00 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt @@ -1,5 +1,5 @@ package test -public trait SubclassOfCollection: MutableCollection { +public interface SubclassOfCollection: MutableCollection { override fun iterator() : MutableIterator } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt index 10c7c39f0e2..25bf767dac3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt @@ -1,5 +1,5 @@ package test -public trait SubclassOfMapEntry: MutableMap.MutableEntry { +public interface SubclassOfMapEntry: MutableMap.MutableEntry { override fun setValue(value: V) : V } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt index 02adf379735..e9ba9cea0d3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt @@ -1,14 +1,14 @@ package test -public trait SubstitutedClassParameter { +public interface SubstitutedClassParameter { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt index 3cb8c75ab78..f0345f50486 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt @@ -1,20 +1,20 @@ package test -public trait SubstitutedClassParameters { +public interface SubstitutedClassParameters { - public trait Super1 { + public interface Super1 { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): E public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt index b13eec046aa..9323ba57a08 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt @@ -1,21 +1,21 @@ //ALLOW_AST_ACCESS package test -public trait TwoSuperclassesConflictingProjectionKinds { +public interface TwoSuperclassesConflictingProjectionKinds { - public trait Super1 { + public interface Super1 { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): MutableCollection } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt index fc100276007..7a2d21e1787 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesInvariantAndCovariantInferMutability { +public interface TwoSuperclassesInvariantAndCovariantInferMutability { - public trait Super1 { + public interface Super1 { public fun foo(): List> public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): MutableList> public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): MutableList> } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt index 619d3384d30..378c2efaffe 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesInvariantAndCovariantInferNullability { +public interface TwoSuperclassesInvariantAndCovariantInferNullability { - public trait Super1 { + public interface Super1 { public fun foo(): List public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): MutableList public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt index 6f735c2b6a5..54e2687c1b3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesMutableAndNot { +public interface TwoSuperclassesMutableAndNot { - public trait Super1 { + public interface Super1 { public fun foo(): MutableCollection public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): List public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt index d6ec4d471e1..72dd34122e3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesReturnJavaSubtype { +public interface TwoSuperclassesReturnJavaSubtype { - public trait Super1 { + public interface Super1 { public fun foo(): CharSequence? public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt index 49a9a598501..992bb022971 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesReturnSameJavaType { +public interface TwoSuperclassesReturnSameJavaType { - public trait Super1 { + public interface Super1 { public fun foo(): CharSequence? public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): CharSequence public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): CharSequence } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt index 50f4406acb2..166aaa8192a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt @@ -1,20 +1,20 @@ package test -public trait TwoSuperclassesSupplementNotNull { +public interface TwoSuperclassesSupplementNotNull { - public trait Super1 { + public interface Super1 { public fun foo(): List public fun dummy() // to avoid loading as SAM interface } - public trait Super2 { + public interface Super2 { public fun foo(): List? public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(): List } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt index 081631672a7..4df690d47b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt @@ -1,14 +1,14 @@ package test -public trait TypeParamOfClass { +public interface TypeParamOfClass { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): T } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt index 813a4d3196a..f2d7e717073 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt @@ -1,14 +1,14 @@ package test -public trait TypeParamOfClassSubstituted { +public interface TypeParamOfClassSubstituted { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): String } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt index 90bc7764f29..17efec439f8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt @@ -1,14 +1,14 @@ package test -public trait TypeParamOfFun { +public interface TypeParamOfFun { - public trait Super { + public interface Super { public fun foo(): T public fun dummy() // to avoid loading as SAM interface } - public trait Sub: Super { + public interface Sub: Super { override fun foo(): E } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt index 453fd1756f2..5f828660626 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt @@ -1,12 +1,12 @@ package test -public trait InheritMutability { +public interface InheritMutability { - public trait Super { + public interface Super { public fun > foo(a: A) } - public trait Sub: Super { + public interface Sub: Super { override fun > foo(a: B) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt index 5753c4d2fac..ece069e6bc5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt @@ -1,12 +1,12 @@ package test -public trait InheritNullability { +public interface InheritNullability { - public trait Super { + public interface Super { public fun foo(a: A) } - public trait Sub: Super { + public interface Sub: Super { override fun foo(a: B) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt index 81a1e0f0b07..7122b05089a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt @@ -1,12 +1,12 @@ package test -public trait InheritReadOnliness { +public interface InheritReadOnliness { - public trait Super { + public interface Super { public fun > foo(a: A) } - public trait Sub: Super { + public interface Sub: Super { override fun > foo(a: B) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt index dacf5136a8c..dbfd33bbfac 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt @@ -1,12 +1,12 @@ package test -public trait TwoBounds { +public interface TwoBounds { - public trait Super { + public interface Super { public fun foo(a: A) where A: Cloneable } - public trait Sub: Super { + public interface Sub: Super { override fun foo(a: B) where B: Cloneable } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt index 83a477b579e..f558260b68a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt @@ -1,16 +1,16 @@ package test -public trait TwoSuperclasses { +public interface TwoSuperclasses { - public trait Super1 { + public interface Super1 { public fun foo(a: A) } - public trait Super2 { + public interface Super2 { public fun foo(a: B) } - public trait Sub: Super1, Super2 { + public interface Sub: Super1, Super2 { override fun foo(a: C) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt index 84777759049..3a40e0fe4e9 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt @@ -1,12 +1,12 @@ package test -public trait TwoTypeParameters { +public interface TwoTypeParameters { - public trait Super { + public interface Super { public fun foo(a: A, b: B) } - public trait Sub: Super { + public interface Sub: Super { override fun foo(a: B, b: A) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt index 8f2a4121b68..dec2c25d0d6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt @@ -1,12 +1,12 @@ package test -public trait UseParameterAsUpperBound { +public interface UseParameterAsUpperBound { - public trait Super { + public interface Super { public fun foo(a: A, b: B) } - public trait Sub: Super { + public interface Sub: Super { override fun foo(a: B, b: A) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt index b3782f7cd65..bcd168bda16 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt @@ -1,12 +1,12 @@ package test -public trait UseParameterInUpperBound { +public interface UseParameterInUpperBound { - public trait Super { + public interface Super { public fun > foo(a: A, b: B) } - public trait Sub: Super { + public interface Sub: Super { override fun > foo(a: B, b: A) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt index 78bec2f2bb0..e23dfc29ef3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt @@ -1,12 +1,12 @@ package test -public trait UseParameterInUpperBoundWithKotlinSignature { +public interface UseParameterInUpperBoundWithKotlinSignature { - public trait Super { + public interface Super { public fun > foo(a: A, b: B) } - public trait Sub: Super { + public interface Sub: Super { override fun > foo(b: B, a: A) } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt index 1c511ceba6a..5919d38f437 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt @@ -1,6 +1,6 @@ package test -public trait LoadIterable { +public interface LoadIterable { public fun getIterable(): MutableIterable? public fun setIterable(p0: Iterable?) } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt index 6961dcf5c7a..2507f007d66 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt @@ -1,6 +1,6 @@ package test -public trait LoadIterator { +public interface LoadIterator { public fun getIterator(): MutableIterator? public fun setIterator(p0: Iterator?) } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt b/compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt index e1905be2a94..4d051165ef9 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt @@ -1,10 +1,10 @@ package test -trait X { +interface X { fun foo() } -trait Y : X { +interface Y : X { } class B(val a: X) : X by a, Y { diff --git a/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt index 22f48cf32c6..56b6a97f8d0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt @@ -1,14 +1,14 @@ package test -public trait Super1 { +public interface Super1 { public fun foo(): CharSequence private fun bar(): String } -public trait Super2 { +public interface Super2 { private fun foo(): String public fun bar(): CharSequence } -public trait Sub: Super1, Super2 { +public interface Sub: Super1, Super2 { } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt b/compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt index da7b91104bb..b18f4353c81 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt @@ -1,14 +1,14 @@ package test -public trait Super1 { +public interface Super1 { val x: String var y: String } -public trait Super2 { +public interface Super2 { var x: String val y: String } -public trait Sub: Super1, Super2 { +public interface Sub: Super1, Super2 { } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt b/compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt index 63759c05d2e..2df0330ac8d 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt @@ -1,14 +1,14 @@ package test -public trait Super1 { +public interface Super1 { val x: String val y: CharSequence } -public trait Super2 { +public interface Super2 { val x: CharSequence val y: String } -public trait Sub: Super1, Super2 { +public interface Sub: Super1, Super2 { } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt b/compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt index 1bc312bf1ed..0814ecc70ac 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt @@ -4,7 +4,7 @@ abstract class A { abstract fun foo() } -trait X : A { +interface X : A { fun bar() { } } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt b/compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt index 56722ba6d48..86e6ec5b0dc 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt @@ -1,6 +1,6 @@ package test -public trait TaskObject { +public interface TaskObject { fun foo(r: Runnable) } diff --git a/compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt b/compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt index 91cd7ae7e6d..8ff364512fd 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt @@ -1,5 +1,5 @@ package test -public trait Runnable { +public interface Runnable { fun run() } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt b/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt index 69cbb457ac8..278978992c1 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { fun foo() {} fun bar() {} diff --git a/compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt b/compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt index 3941dd674d9..b5445808ac2 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt +++ b/compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt @@ -1,7 +1,7 @@ package test -trait Foo -trait Bar +interface Foo +interface Bar fun foo(): Unit where T : Foo, T : Bar diff --git a/compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt b/compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt index 2503e31b83b..16ed1ff1e3f 100644 --- a/compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt +++ b/compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt @@ -5,6 +5,6 @@ class O { inner class A2 class B1 inner class B2 - trait C1 - trait C2 + interface C1 + interface C2 } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt b/compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt index af98fd5137a..5ee880f0164 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt +++ b/compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt @@ -1,7 +1,7 @@ //ALLOW_AST_ACCESS package test -trait Trait { +interface Trait { val shape: String } diff --git a/compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt b/compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt index 82b6fac1f6e..211ad5593f7 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt +++ b/compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt @@ -2,7 +2,7 @@ package test -trait A { +interface A { var v: String get() = "test" set(value) { diff --git a/compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt b/compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt index ec6bf93ad2e..8ce94123cf1 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt +++ b/compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt @@ -2,7 +2,7 @@ package test -trait A { +interface A { val v: String get() = "test" } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt b/compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt index 819754f5272..68cb487a80f 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt +++ b/compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt @@ -2,7 +2,7 @@ package test // test composed from KT-2193 -trait A { +interface A { open var v: String get() = "test" set(value) { diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt b/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt index 2b022f3abf9..fb1e41fbbdb 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt @@ -1,7 +1,7 @@ //ALLOW_AST_ACCESS package test -trait A { +interface A { internal fun f() : Int internal val v : Int public var p : Int diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt index 3b6baffd352..79f342af7df 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { internal fun f() : Int internal val v : Int public var p : Int diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt index e5b18701b67..6ebb066ee81 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt @@ -1,6 +1,6 @@ package test -trait A { +interface A { internal open fun f() : Int = 0 internal open val v : Int get() = 0 diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt index d37c9e22694..5f4be2a404d 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt @@ -2,7 +2,7 @@ package test import org.jetbrains.annotations.* -public trait LoadIterable { +public interface LoadIterable { Mutable public fun getIterable(): MutableIterable? public fun setIterable([Mutable] p0: MutableIterable?) diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt index 1ca3be99181..692c6979b8d 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt @@ -2,7 +2,7 @@ package test import org.jetbrains.annotations.* -public trait LoadIterableWithConflict { +public interface LoadIterableWithConflict { [ReadOnly] [Mutable] public fun getIterable(): MutableIterable? public fun setIterable([ReadOnly] [Mutable] p0: MutableIterable?) diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt index a12cab694f6..2a8f4828924 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt @@ -2,7 +2,7 @@ package test import org.jetbrains.annotations.* -public trait LoadIterableWithNullability { +public interface LoadIterableWithNullability { Mutable public fun getIterable(): MutableIterable public fun setIterable([Mutable] p0: MutableIterable) diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt index 12bc5b12de1..48ec8e1d2ce 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt @@ -3,8 +3,8 @@ package test import java.util.ArrayList import org.jetbrains.annotations.* -public trait LoadIterableWithPropagation { - public trait LoadIterable { +public interface LoadIterableWithPropagation { + public interface LoadIterable { Mutable public fun getIterable(): MutableIterable? public fun setIterable([Mutable] p0: MutableIterable?) diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot/supers.kt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot/supers.kt index 8395f7c57a9..e62b22c23d1 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot/supers.kt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot/supers.kt @@ -1,11 +1,11 @@ package test -public trait Super1 { +public interface Super1 { public fun String.foo() public fun Array.bar() } -public trait Super2 { +public interface Super2 { public fun foo(p: String) public fun bar(vararg p: String) } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation/TraitAndImpl.kt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation/TraitAndImpl.kt index 8c22ca36e2e..831d7e8e23f 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation/TraitAndImpl.kt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation/TraitAndImpl.kt @@ -1,6 +1,6 @@ package test -trait Trait { +interface Trait { fun foo(): String = "foo" fun bar(): String = "bar" diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt index 37d46535777..1947a46a0aa 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt @@ -1,6 +1,6 @@ package test -trait B { +interface B { fun foo(kotlinName: Int) } diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt index b8ebf98b8fc..d246def9408 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt @@ -1,5 +1,5 @@ package test -trait K1 : J { +interface K1 : J { override fun foo(k: K?) } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin/K.kt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin/K.kt index 38a3d12f5fa..b9421ff1014 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin/K.kt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin/K.kt @@ -1,3 +1,3 @@ package test -trait K \ No newline at end of file +interface K \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass/K.kt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass/K.kt index 8f1eb163a72..9e966981ce5 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass/K.kt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass/K.kt @@ -1,5 +1,5 @@ package test -trait K { +interface K { public fun foo(l: MutableList): String } \ No newline at end of file diff --git a/compiler/testData/psi/DefaultKeyword.kt b/compiler/testData/psi/DefaultKeyword.kt index b9408a7b2ec..a4417076ad8 100644 --- a/compiler/testData/psi/DefaultKeyword.kt +++ b/compiler/testData/psi/DefaultKeyword.kt @@ -33,7 +33,7 @@ object A { companion object } -trait A { +interface A { companion object class C { diff --git a/compiler/testData/psi/DefaultKeyword.txt b/compiler/testData/psi/DefaultKeyword.txt index eb230ed3e19..098e5cdc5f6 100644 --- a/compiler/testData/psi/DefaultKeyword.txt +++ b/compiler/testData/psi/DefaultKeyword.txt @@ -158,7 +158,7 @@ JetFile: DefaultKeyword.kt PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') CLASS - PsiElement(trait)('trait') + PsiElement(interface)('interface') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('A') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TraitConstructor.kt b/compiler/testData/psi/TraitConstructor.kt index 31fe90fd1ab..f8f4d16f12a 100644 --- a/compiler/testData/psi/TraitConstructor.kt +++ b/compiler/testData/psi/TraitConstructor.kt @@ -1,2 +1,2 @@ -trait TestTrait(val a: Int, var b: String, c: Double) -trait TestTrait() \ No newline at end of file +interface TestTrait(val a: Int, var b: String, c: Double) +interface TestTrait() \ No newline at end of file diff --git a/compiler/testData/psi/TraitConstructor.txt b/compiler/testData/psi/TraitConstructor.txt index de7b7ae4b39..f1f0d6e384c 100644 --- a/compiler/testData/psi/TraitConstructor.txt +++ b/compiler/testData/psi/TraitConstructor.txt @@ -2,7 +2,7 @@ JetFile: TraitConstructor.kt PACKAGE_DIRECTIVE CLASS - PsiElement(trait)('trait') + PsiElement(interface)('interface') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('TestTrait') PRIMARY_CONSTRUCTOR @@ -43,7 +43,7 @@ JetFile: TraitConstructor.kt PsiElement(RPAR)(')') PsiWhiteSpace('\n') CLASS - PsiElement(trait)('trait') + PsiElement(interface)('interface') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('TestTrait') PRIMARY_CONSTRUCTOR diff --git a/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.kt b/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.kt index 33134b6e936..06e3f41875f 100644 --- a/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.kt +++ b/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.kt @@ -10,4 +10,4 @@ fun func() {} class C [file:] -trait T +interface T diff --git a/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.txt b/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.txt index 1ad029663f2..54f5875da84 100644 --- a/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.txt +++ b/compiler/testData/psi/annotation/onFile/fileAnnotationInWrongPlace.txt @@ -88,6 +88,6 @@ JetFile: fileAnnotationInWrongPlace.kt PsiElement(RBRACKET)(']') PsiWhiteSpace('\n') - PsiElement(trait)('trait') + PsiElement(interface)('interface') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('T') \ No newline at end of file diff --git a/compiler/testData/recursiveProcessor/declarations.kt b/compiler/testData/recursiveProcessor/declarations.kt index 221a1776ee4..780d73fbb4c 100644 --- a/compiler/testData/recursiveProcessor/declarations.kt +++ b/compiler/testData/recursiveProcessor/declarations.kt @@ -4,7 +4,7 @@ fun T1.func(a: T1): T1 = a val T2.prop: T2? = null var propVar: Any? = null -trait Trait { +interface Trait { fun traitFunc(): Unit {} val traitProp: Any? } @@ -24,8 +24,8 @@ object Object { val objProp: Any? = null } -trait Outer { - trait NestedTrait { +interface Outer { + interface NestedTrait { fun nestedTraitFun() {} } diff --git a/compiler/testData/renderer/Classes.kt b/compiler/testData/renderer/Classes.kt index 253f20f5042..88025ee9481 100644 --- a/compiler/testData/renderer/Classes.kt +++ b/compiler/testData/renderer/Classes.kt @@ -22,7 +22,7 @@ public open class TheClass [AnotherAnnotation] () { internal class InternalClass { } -trait TheTrait { +interface TheTrait { fun abstractFun() companion object : TheClass { @@ -32,7 +32,7 @@ trait TheTrait { public class WithReified -public trait TwoUpperBounds where T : Number, T : Any +public interface TwoUpperBounds where T : Number, T : Any //package rendererTest //internal final annotation class TheAnnotation : kotlin.Annotation defined in rendererTest diff --git a/compiler/testData/renderer/GlobalFunctions.kt b/compiler/testData/renderer/GlobalFunctions.kt index 88261778537..eb68cc0a21b 100644 --- a/compiler/testData/renderer/GlobalFunctions.kt +++ b/compiler/testData/renderer/GlobalFunctions.kt @@ -12,8 +12,8 @@ public fun Int.ext(): Int {} public fun withTypeParam(a: Array): Int {} -trait Foo -trait Bar +interface Foo +interface Bar fun

funTypeParameterWithTwoUpperBounds() where P : Foo, P : Bar = 17 diff --git a/compiler/testData/renderer/InheritedMembersVisibility.kt b/compiler/testData/renderer/InheritedMembersVisibility.kt index 391a7607021..d89e893e4c0 100644 --- a/compiler/testData/renderer/InheritedMembersVisibility.kt +++ b/compiler/testData/renderer/InheritedMembersVisibility.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val v: Int public var int: Int private set diff --git a/compiler/testData/renderer/KeywordsInNames.kt b/compiler/testData/renderer/KeywordsInNames.kt index 21e40e46ce4..1c92b06d8f7 100644 --- a/compiler/testData/renderer/KeywordsInNames.kt +++ b/compiler/testData/renderer/KeywordsInNames.kt @@ -2,16 +2,16 @@ annotation class `true` val `val` = 5 -`true` trait `trait` +`true` interface `interface` class `class`<`in`>(p: `in`?) { inner class `class` } -val `is` = `class`<`trait`>(null).`class`() -val `in` = `class`<`trait`>(null) +val `is` = `class`<`interface`>(null).`class`() +val `in` = `class`<`interface`>(null) -fun <`in` : `trait`> `trait`.`fun`(`false`: `trait`): `trait` where `in` : Number +fun <`in` : `interface`> `interface`.`fun`(`false`: `interface`): `interface` where `in` : Number val AS_SAFE = 1 val NOT_IN = 2 @@ -20,7 +20,7 @@ val NOT_IS = 3 //internal final annotation class `true` : kotlin.Annotation defined in root package //public constructor `true`() defined in `true` //internal val `val`: kotlin.Int defined in root package -//`true` internal interface `trait` defined in root package +//`true` internal interface `interface` defined in root package //internal final class `class`<`in`> defined in root package //<`in`> defined in `class` //public constructor `class`<`in`>(p: `in`?) defined in `class` @@ -28,10 +28,10 @@ val NOT_IS = 3 //internal final inner class `class` defined in `class` //public constructor `class`() defined in `class`.`class` //internal val `is`: `class`.`class` defined in root package -//internal val `in`: `class`<`trait`> defined in root package -//internal fun <`in` : `trait`> `trait`.`fun`(`false`: `trait`): `trait` where `in` : kotlin.Number defined in root package -//<`in` : `trait` & kotlin.Number> defined in `fun` -//value-parameter val `false`: `trait` defined in `fun` +//internal val `in`: `class`<`interface`> defined in root package +//internal fun <`in` : `interface`> `interface`.`fun`(`false`: `interface`): `interface` where `in` : kotlin.Number defined in root package +//<`in` : `interface` & kotlin.Number> defined in `fun` +//value-parameter val `false`: `interface` defined in `fun` //internal val AS_SAFE: kotlin.Int defined in root package //internal val NOT_IN: kotlin.Int defined in root package //internal val NOT_IS: kotlin.Int defined in root package diff --git a/compiler/testData/repl/classes/simpleTrait.repl b/compiler/testData/repl/classes/simpleTrait.repl index e976e55c927..160c0565415 100644 --- a/compiler/testData/repl/classes/simpleTrait.repl +++ b/compiler/testData/repl/classes/simpleTrait.repl @@ -1,5 +1,5 @@ ->>> trait A ->>> trait B : A { +>>> interface A +>>> interface B : A { ... fun foo() = 45 ... } >>> javaClass().isAssignableFrom(javaClass()) diff --git a/compiler/testData/resolve/PropertyAndFunctionNameClash.resolve b/compiler/testData/resolve/PropertyAndFunctionNameClash.resolve index 9dee49d1649..68535f62030 100644 --- a/compiler/testData/resolve/PropertyAndFunctionNameClash.resolve +++ b/compiler/testData/resolve/PropertyAndFunctionNameClash.resolve @@ -1,6 +1,6 @@ open class HtmlTag -trait NavigationBuilder { +interface NavigationBuilder { public var text: ((String) -> String)? ~in_NB~var inNavigationBuilder: Int } @@ -10,7 +10,7 @@ fun HtmlTag.navigation(body: NavigationBuilder.() -> Unit) { fun HtmlTag.a(contents: A.() -> Unit) { } -trait A : HtmlTag { +interface A : HtmlTag { ~text_in_A~var text: String ~in_A~var inA: Int } diff --git a/compiler/testData/resolve/Super.resolve b/compiler/testData/resolve/Super.resolve index 75e54307ee8..9a7a3397370 100644 --- a/compiler/testData/resolve/Super.resolve +++ b/compiler/testData/resolve/Super.resolve @@ -1,4 +1,4 @@ -~T~trait T { +~T~interface T { fun foo() {} } ~C~open class C() { @@ -25,7 +25,7 @@ } } -~G~trait G { +~G~interface G { fun foo() {} } diff --git a/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve b/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve index ecc00e7bfa6..65e5dd8818c 100644 --- a/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve +++ b/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve @@ -8,10 +8,10 @@ val a1: `fromOtherPackage`TestClass? = null //FILE:fromRoot.kt //---------------------------------------------------------------------------------- -trait ~fromRoot~TestClass +interface ~fromRoot~TestClass //FILE:fromOtherPackage.kt //---------------------------------------------------------------------------------- package testing -trait ~fromOtherPackage~TestClass \ No newline at end of file +interface ~fromOtherPackage~TestClass \ No newline at end of file diff --git a/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve b/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve index 2fb61f8cac5..4f19cf5fc71 100644 --- a/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve +++ b/compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve @@ -10,7 +10,7 @@ val a1: `fromSamePackage`TestClass? = null //---------------------------------------------------------------------------------- package otherPackage -trait ~fromOtherPackage~TestClass +interface ~fromOtherPackage~TestClass //FILE:fromSamePackage.kt diff --git a/compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve b/compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve index 94a35f57eac..7fe7b8c5bdf 100644 --- a/compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve +++ b/compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve @@ -5,8 +5,8 @@ package test import testing.InTesting2 import testing.InTesting1 -trait ~InTest1~InTest1 : `InTesting1`InTesting1 -trait ~InTest2~InTest2 : `InTesting2`InTesting2 +interface ~InTest1~InTest1 : `InTesting1`InTesting1 +interface ~InTest2~InTest2 : `InTesting2`InTesting2 //FILE:testing.kt //---------------------------------------------------------------------------------- @@ -14,5 +14,5 @@ package testing import test.InTest2 -trait ~InTesting1~InTesting1 : `InTest2`InTest2 -trait ~InTesting2~InTesting2 +interface ~InTesting1~InTesting1 : `InTest2`InTest2 +interface ~InTesting2~InTesting2 diff --git a/compiler/testData/resolve/imports/ImportResolveOrderStable.resolve b/compiler/testData/resolve/imports/ImportResolveOrderStable.resolve index 680e85831cc..647a892a56f 100644 --- a/compiler/testData/resolve/imports/ImportResolveOrderStable.resolve +++ b/compiler/testData/resolve/imports/ImportResolveOrderStable.resolve @@ -8,7 +8,7 @@ import testing.allUnder.* // The goal is to activate lazy resolve in order Second, Other class FirstOrder: `other`Other, FirstInternal -trait FirstInternal: `exact`Second +interface FirstInternal: `exact`Second @@ -22,7 +22,7 @@ import testing.allUnder.* // The goal is to activate lazy resolve in order Other, Second class FirstOrder: FirstInternal, `other`Other -trait FirstInternal: `exact`Second +interface FirstInternal: `exact`Second @@ -30,16 +30,16 @@ trait FirstInternal: `exact`Second //---------------------------------------------------------------------------------- package testing.allUnder -trait ~allUnder~Second +interface ~allUnder~Second //FILE:secondForExactImport.kt //---------------------------------------------------------------------------------- package testing.exact -trait ~exact~Second +interface ~exact~Second //FILE:someOther.kt //---------------------------------------------------------------------------------- package testing.other -trait ~other~Other \ No newline at end of file +interface ~other~Other \ No newline at end of file diff --git a/compiler/testData/resolve/labels/labelForPropertyInGetter.resolve b/compiler/testData/resolve/labels/labelForPropertyInGetter.resolve index 3dcae60460c..d76aa0a685d 100644 --- a/compiler/testData/resolve/labels/labelForPropertyInGetter.resolve +++ b/compiler/testData/resolve/labels/labelForPropertyInGetter.resolve @@ -1,4 +1,4 @@ -trait Base { +interface Base { fun foo() } diff --git a/compiler/testData/resolve/labels/labelForPropertyInSetter.resolve b/compiler/testData/resolve/labels/labelForPropertyInSetter.resolve index c9d22a39e8a..b53b527f8ee 100644 --- a/compiler/testData/resolve/labels/labelForPropertyInSetter.resolve +++ b/compiler/testData/resolve/labels/labelForPropertyInSetter.resolve @@ -1,4 +1,4 @@ -trait Base { +interface Base { fun foo() } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt b/compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt index 73106ef7960..b1a2bc749b6 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt @@ -1,5 +1,5 @@ open class B(x: Int) -trait C +interface C class A : B, C { constructor(): super(1) { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimary.txt b/compiler/testData/resolveConstructorDelegationCalls/superPrimary.txt index 41fbde535fa..1ffdf1c42c5 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimary.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimary.txt @@ -1,5 +1,5 @@ open class B(x: Int) -trait C +interface C class A : B, C { constructor(): super(1) { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt index 6271104ef4c..dbf60bc57b9 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt @@ -1,5 +1,5 @@ open class B -trait C +interface C class A : B, C { constructor(): super() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.txt b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.txt index 9fa46de7ad2..388b9244457 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.txt @@ -1,5 +1,5 @@ open class B -trait C +interface C class A : B, C { constructor(): super() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt index 20d6cd5b876..d5592972dcf 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt @@ -1,5 +1,5 @@ open class B -trait C +interface C class A : B, C { constructor() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.txt b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.txt index 4e557d66a65..cbda5bb38ad 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.txt @@ -1,5 +1,5 @@ open class B -trait C +interface C class A : B, C { constructor() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt b/compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt index 111832c5d55..8ca7fc13f10 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt @@ -1,7 +1,7 @@ open class B { constructor(x: Int) {} } -trait C +interface C class A : B, C { constructor(): super(1) { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondary.txt b/compiler/testData/resolveConstructorDelegationCalls/superSecondary.txt index 7ddfad21676..1aeba0d9b4c 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondary.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondary.txt @@ -1,7 +1,7 @@ open class B { constructor(x: Int) {} } -trait C +interface C class A : B, C { constructor(): super(1) { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt index be3bff3c20e..c8116ea7c32 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt @@ -1,7 +1,7 @@ open class B { constructor() {} } -trait C +interface C class A : B, C { constructor() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.txt b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.txt index 3fb3bd10b32..5b0fd6f3236 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.txt @@ -1,7 +1,7 @@ open class B { constructor() {} } -trait C +interface C class A : B, C { constructor() { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt index 509cf4f1c0c..40df040e867 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt @@ -2,7 +2,7 @@ open class B(x: Double) { constructor(x: Int) {} constructor(x: String) {} } -trait C +interface C class A : B, C { constructor(): super("abc") { } } diff --git a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.txt b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.txt index f1e377840f0..0bea777662f 100644 --- a/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.txt +++ b/compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.txt @@ -2,7 +2,7 @@ open class B(x: Double) { constructor(x: Int) {} constructor(x: String) {} } -trait C +interface C class A : B, C { constructor(): super("abc") { } } diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt index 52c77b2e2b7..1db2e15b8a8 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: Int.()->Unit fun test() { diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.txt b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.txt index 1b52dd128e9..596c3e9269d 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.txt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.txt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: Int.()->Unit fun test() { diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt index 0ddcfad66f8..0d36a46d1ba 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: Int.()->Unit fun test() { diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.txt b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.txt index 4375c4cddd7..8ed821533f3 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.txt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.txt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: Int.()->Unit fun test() { diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt index bc7c508eecb..950b612da58 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: (Int)->Int } diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.txt b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.txt index 1c52afe2a0b..6386144288d 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.txt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.txt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: (Int)->Int } diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt index ce3c9349213..c15d29afe04 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: (Int)->Int } diff --git a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.txt b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.txt index 614de01fa99..79e91aef144 100644 --- a/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.txt +++ b/compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.txt @@ -1,4 +1,4 @@ -trait A { +interface A { val foo: (Int)->Int } diff --git a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt index 65af828148a..5e244b71f06 100644 --- a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt +++ b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt @@ -2,7 +2,7 @@ class A { fun B.foo() {} } -trait B +interface B fun bar(a: A, b: B) { with (a) { diff --git a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.txt b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.txt index cb2e2a42770..7284936dd93 100644 --- a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.txt +++ b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.txt @@ -2,7 +2,7 @@ class A { fun B.foo() {} } -trait B +interface B fun bar(a: A, b: B) { with (a) { diff --git a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt index 7c5e2390443..5ed43b236d4 100644 --- a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt +++ b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt @@ -2,7 +2,7 @@ class A { fun B.foo() {} } -trait B +interface B fun bar(a: A, b: B) { with (a) { diff --git a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.txt b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.txt index 9394bc1338d..120feb28091 100644 --- a/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.txt +++ b/compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.txt @@ -2,7 +2,7 @@ class A { fun B.foo() {} } -trait B +interface B fun bar(a: A, b: B) { with (a) { diff --git a/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt b/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt index e8799a68b01..e2d8f9f38ed 100644 --- a/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt +++ b/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt @@ -1,4 +1,4 @@ -trait Element { +interface Element { fun render(builder: StringBuilder, indent: String) } diff --git a/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.txt b/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.txt index c4dadd1f22c..e72bd4bf941 100644 --- a/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.txt +++ b/compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.txt @@ -1,4 +1,4 @@ -trait Element { +interface Element { fun render(builder: StringBuilder, indent: String) } diff --git a/compiler/testData/type-checker-test.kt b/compiler/testData/type-checker-test.kt index 516a8b4433d..fbe82903fc1 100644 --- a/compiler/testData/type-checker-test.kt +++ b/compiler/testData/type-checker-test.kt @@ -38,14 +38,14 @@ fun f(a : Int) : Int {a} fun f(a : Float, b : Int) : Float {a} fun f(a : Float) : T {a} -trait Parent -trait A: Parent -trait B: Parent +interface Parent +interface A: Parent +interface B: Parent -trait Rec +interface Rec class ARec : Rec class BRec : Rec -trait SubRec: Rec +interface SubRec: Rec -trait Star> -trait SubStar> : Star \ No newline at end of file +interface Star> +interface SubStar> : Star \ No newline at end of file diff --git a/compiler/testData/type/binding/explicit/inProjection.kt b/compiler/testData/type/binding/explicit/inProjection.kt index 57479213acb..8081347081b 100644 --- a/compiler/testData/type/binding/explicit/inProjection.kt +++ b/compiler/testData/type/binding/explicit/inProjection.kt @@ -1,6 +1,6 @@ -trait Inv -trait In -trait Out +interface Inv +interface In +interface Out val foo: Inv>> = null!! diff --git a/compiler/testData/type/binding/explicit/outProjection.kt b/compiler/testData/type/binding/explicit/outProjection.kt index ca9daf9b89b..2bc4c868c8d 100644 --- a/compiler/testData/type/binding/explicit/outProjection.kt +++ b/compiler/testData/type/binding/explicit/outProjection.kt @@ -1,6 +1,6 @@ -trait Inv -trait In -trait Out +interface Inv +interface In +interface Out val foo: Inv>> = null!! diff --git a/compiler/testData/type/binding/explicit/typeWithBracket.kt b/compiler/testData/type/binding/explicit/typeWithBracket.kt index ad36e6d6ae6..c0860f6a563 100644 --- a/compiler/testData/type/binding/explicit/typeWithBracket.kt +++ b/compiler/testData/type/binding/explicit/typeWithBracket.kt @@ -1,4 +1,4 @@ -trait Inv +interface Inv val foo: Inv)?)> = null!! /* diff --git a/compiler/testData/type/binding/implicit/inProjection.kt b/compiler/testData/type/binding/implicit/inProjection.kt index 0a0df0499aa..229b5c2176c 100644 --- a/compiler/testData/type/binding/implicit/inProjection.kt +++ b/compiler/testData/type/binding/implicit/inProjection.kt @@ -1,6 +1,6 @@ -trait Inv -trait In -trait Out +interface Inv +interface In +interface Out fun getT(): T = null!! diff --git a/compiler/testData/type/binding/implicit/outProjection.kt b/compiler/testData/type/binding/implicit/outProjection.kt index 52c5398eea7..18150126dc5 100644 --- a/compiler/testData/type/binding/implicit/outProjection.kt +++ b/compiler/testData/type/binding/implicit/outProjection.kt @@ -1,6 +1,6 @@ -trait Inv -trait In -trait Out +interface Inv +interface In +interface Out fun getT(): T = null!! diff --git a/compiler/testData/type/binding/implicit/typeWithBracket.kt b/compiler/testData/type/binding/implicit/typeWithBracket.kt index ed633a9e502..aaaad1db39f 100644 --- a/compiler/testData/type/binding/implicit/typeWithBracket.kt +++ b/compiler/testData/type/binding/implicit/typeWithBracket.kt @@ -1,4 +1,4 @@ -trait Inv +interface Inv fun getT(): T = null!! diff --git a/compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt b/compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt index 0ed166d19e3..b6d6bbee1c1 100644 --- a/compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt +++ b/compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt @@ -1,5 +1,5 @@ public class Foo() { - public trait MyTrait { + public interface MyTrait { } } diff --git a/compiler/testData/writeFlags/class/accessFlags/publicInterface.kt b/compiler/testData/writeFlags/class/accessFlags/publicInterface.kt index 928c0aa3b23..5dc36e13db7 100644 --- a/compiler/testData/writeFlags/class/accessFlags/publicInterface.kt +++ b/compiler/testData/writeFlags/class/accessFlags/publicInterface.kt @@ -1,4 +1,4 @@ -public trait MyTrait { +public interface MyTrait { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt index 10fb0bae3c3..56e2a960a11 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt @@ -1,4 +1,4 @@ -deprecated("") public trait MyTrait { +deprecated("") public interface MyTrait { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt b/compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt index 2eb3546370c..c729ec91e81 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt @@ -1,5 +1,5 @@ class Foo { - trait MyClass { + interface MyClass { } } diff --git a/compiler/testData/writeFlags/class/visibility/internal/trait.kt b/compiler/testData/writeFlags/class/visibility/internal/trait.kt index decaf46b670..0159ceab694 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/trait.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/trait.kt @@ -1,4 +1,4 @@ -trait MyClass { +interface MyClass { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/visibility/private/innerTrait.kt b/compiler/testData/writeFlags/class/visibility/private/innerTrait.kt index a98d1288027..71511c5434a 100644 --- a/compiler/testData/writeFlags/class/visibility/private/innerTrait.kt +++ b/compiler/testData/writeFlags/class/visibility/private/innerTrait.kt @@ -1,5 +1,5 @@ class Foo { - private trait MyClass { + private interface MyClass { } } diff --git a/compiler/testData/writeFlags/class/visibility/private/trait.kt b/compiler/testData/writeFlags/class/visibility/private/trait.kt index 73519fafceb..ae929a2a14a 100644 --- a/compiler/testData/writeFlags/class/visibility/private/trait.kt +++ b/compiler/testData/writeFlags/class/visibility/private/trait.kt @@ -1,4 +1,4 @@ -private trait MyClass { +private interface MyClass { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/visibility/public/innerTrait.kt b/compiler/testData/writeFlags/class/visibility/public/innerTrait.kt index 14230c2ad16..992e923cd8f 100644 --- a/compiler/testData/writeFlags/class/visibility/public/innerTrait.kt +++ b/compiler/testData/writeFlags/class/visibility/public/innerTrait.kt @@ -1,5 +1,5 @@ class Foo { - public trait MyClass { + public interface MyClass { } } diff --git a/compiler/testData/writeFlags/class/visibility/public/trait.kt b/compiler/testData/writeFlags/class/visibility/public/trait.kt index 6474e8547ff..1127f93e63a 100644 --- a/compiler/testData/writeFlags/class/visibility/public/trait.kt +++ b/compiler/testData/writeFlags/class/visibility/public/trait.kt @@ -1,4 +1,4 @@ -public trait MyClass { +public interface MyClass { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt index f6f8a7bd43d..9327e128689 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt @@ -8,7 +8,7 @@ class TestDelegate() { } } -trait Test { +interface Test { companion object { protected var prop: Int by TestDelegate() } diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt index a5e20461659..8f2b1f37946 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt @@ -4,7 +4,7 @@ class TestDelegate() { } } -trait Test { +interface Test { companion object { public val prop: Int by TestDelegate() } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt index 5e683811d47..8efb6af7605 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { val prop: Int = 0; } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt index e702feafe76..c0fab7bcef3 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { var prop: Int = 0; } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt index 1e44a6f72c4..83c76732140 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { var prop: Int = 0 private set diff --git a/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt b/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt index 134974165db..e7f6a804a29 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { var prop: Int get() { diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt index a50ec0ef3ec..6d4377cf9a5 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { private val prop = 0; } diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt index 42cc3f626dc..920ecceabbd 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { private var prop = 0; } diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt index be22ea7a9ee..1fa7908a250 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { protected val prop: Int = 0 } diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt index 01e3ebdb493..351d3c38462 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { protected var prop: Int = 0 private set diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt index 8baaed18a9d..2a7f7a435c9 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public val prop: Int = 0; } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt index 96426d70215..bc69fec307b 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public val prop: Int = 0 get() { diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt index c7b4c80f4aa..0592a51be66 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public var prop: Int = 0 } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt index c906b7d8602..64a46513fec 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public var prop: Int = 0 set(i : Int) { diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt index c92e0eb90f2..6582aa047a3 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public var prop: Int = 0 private set diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt index fd9db353663..dae77bd9504 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public var prop: Int = 0 protected set diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt index b9b73820007..1280dc23708 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt @@ -1,4 +1,4 @@ -trait Test { +interface Test { companion object { public var prop: Int = 0 public set diff --git a/compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt b/compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt index 9441498ed92..0b99bc77992 100644 --- a/compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt +++ b/compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt @@ -1,5 +1,5 @@ -trait Derived: List +interface Derived: List // class: Derived // jvm signature: Derived diff --git a/compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt b/compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt index b2dc85c7503..4b9fea8083f 100644 --- a/compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt +++ b/compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt @@ -1,5 +1,5 @@ -trait Base +interface Base class Derived: Base // class: Derived diff --git a/compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt b/compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt index 7e8ac77788c..b89a1092ecc 100644 --- a/compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt +++ b/compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt @@ -1,6 +1,6 @@ -trait Base -trait Intermediate +interface Base +interface Intermediate class Derived: Intermediate> // class: Derived