From f20c4dac15e960e2a1263a3b79022a8081392449 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Tue, 13 Nov 2012 20:10:45 +0400 Subject: [PATCH] Cleanup in tests. --- .../return/AddNotNullJavaSubtype.java | 14 +++++--------- .../propagation/return/AddNotNullJavaSubtype.kt | 11 ++++++----- .../return/AddNotNullJavaSubtype.txt | 12 ++++++------ .../return/AddNotNullSameJavaType.java | 14 +++++--------- .../return/AddNotNullSameJavaType.kt | 11 ++++++----- .../return/AddNotNullSameJavaType.txt | 12 ++++++------ .../return/AddNullabilityJavaSubtype.java | 17 +++++++---------- .../return/AddNullabilityJavaSubtype.kt | 11 ++++++----- .../return/AddNullabilityJavaSubtype.txt | 12 ++++++------ .../return/AddNullabilitySameGenericType1.java | 16 +++++++--------- .../return/AddNullabilitySameGenericType1.kt | 11 ++++++----- .../return/AddNullabilitySameGenericType1.txt | 12 ++++++------ .../return/AddNullabilitySameGenericType2.java | 16 +++++++--------- .../return/AddNullabilitySameGenericType2.kt | 11 ++++++----- .../return/AddNullabilitySameGenericType2.txt | 12 ++++++------ .../return/AddNullabilitySameJavaType.java | 16 +++++++--------- .../return/AddNullabilitySameJavaType.kt | 11 ++++++----- .../return/AddNullabilitySameJavaType.txt | 12 ++++++------ ...InheritNullabilityGenericSubclassSimple.java | 15 +++++++-------- .../InheritNullabilityGenericSubclassSimple.kt | 11 ++++++----- .../InheritNullabilityGenericSubclassSimple.txt | 12 ++++++------ .../return/InheritNullabilityJavaSubtype.java | 15 +++++++-------- .../return/InheritNullabilityJavaSubtype.kt | 11 ++++++----- .../return/InheritNullabilityJavaSubtype.txt | 12 ++++++------ .../InheritNullabilitySameGenericType.java | 15 +++++++-------- .../return/InheritNullabilitySameGenericType.kt | 11 ++++++----- .../InheritNullabilitySameGenericType.txt | 12 ++++++------ .../return/InheritNullabilitySameJavaType.java | 15 +++++++-------- .../return/InheritNullabilitySameJavaType.kt | 11 ++++++----- .../return/InheritNullabilitySameJavaType.txt | 12 ++++++------ .../return/InheritReadOnlinessOfArgument.java | 15 +++++++-------- .../return/InheritReadOnlinessOfArgument.kt | 11 ++++++----- .../return/InheritReadOnlinessOfArgument.txt | 12 ++++++------ .../return/InheritReadOnlinessSameClass.java | 15 +++++++-------- .../return/InheritReadOnlinessSameClass.kt | 11 ++++++----- .../return/InheritReadOnlinessSameClass.txt | 12 ++++++------ .../return/InheritReadOnlinessSubclass.java | 15 +++++++-------- .../return/InheritReadOnlinessSubclass.kt | 11 ++++++----- .../return/InheritReadOnlinessSubclass.txt | 12 ++++++------ .../propagation/return/InheritVariance.java | 15 +++++++-------- .../propagation/return/InheritVariance.kt | 11 ++++++----- .../propagation/return/InheritVariance.txt | 12 ++++++------ .../TwoSuperclassesReturnJavaSubtype.java | 11 ++++++----- .../return/TwoSuperclassesReturnJavaSubtype.kt | 11 ++++++----- .../return/TwoSuperclassesReturnJavaSubtype.txt | 12 +++++++----- .../TwoSuperclassesReturnSameJavaType.java | 11 ++++++----- .../return/TwoSuperclassesReturnSameJavaType.kt | 11 ++++++----- .../TwoSuperclassesReturnSameJavaType.txt | 12 +++++++----- 48 files changed, 300 insertions(+), 303 deletions(-) diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java index 0e05b6fba58..3f549f3cb18 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java @@ -1,19 +1,15 @@ package test; import org.jetbrains.annotations.NotNull; -import java.lang.CharSequence; -import jet.runtime.typeinfo.KotlinSignature; +public interface AddNotNullJavaSubtype { -public class AddNotNullJavaSubtype { - public CharSequence foo() { - throw new UnsupportedOperationException(); + public interface Super { + CharSequence foo(); } - public class Sub extends AddNotNullJavaSubtype { + public interface Sub extends Super { @NotNull - public String foo() { - throw new UnsupportedOperationException(); - } + String foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt index e6b37eaa4fe..4423bc6e1f7 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNotNullJavaSubtype : Object { -public open class AddNotNullJavaSubtype : java.lang.Object() { - public open fun foo(): CharSequence? = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence? + } - public open class Sub: AddNotNullJavaSubtype() { - override fun foo(): String = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): String } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.txt index d655363e8f0..015c3fbbbf7 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNotNullJavaSubtype : java.lang.Object { - public final /*constructor*/ fun (): test.AddNotNullJavaSubtype - public open fun foo(): jet.CharSequence? - public open class test.AddNotNullJavaSubtype.Sub : test.AddNotNullJavaSubtype { - public final /*constructor*/ fun (): test.AddNotNullJavaSubtype.Sub - public open override /*1*/ fun foo(): jet.String +public abstract trait test.AddNotNullJavaSubtype : java.lang.Object { + public abstract trait test.AddNotNullJavaSubtype.Sub : test.AddNotNullJavaSubtype.Super { + public abstract override /*1*/ fun foo(): jet.String + } + public abstract trait test.AddNotNullJavaSubtype.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence? } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java index ad9d9a91b2c..5edb185da4c 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java @@ -1,19 +1,15 @@ package test; import org.jetbrains.annotations.NotNull; -import java.lang.CharSequence; -import jet.runtime.typeinfo.KotlinSignature; +public interface AddNotNullSameJavaType { -public class AddNotNullSameJavaType { - public CharSequence foo() { - throw new UnsupportedOperationException(); + public interface Super { + CharSequence foo(); } - public class Sub extends AddNotNullSameJavaType { + public interface Sub extends Super { @NotNull - public CharSequence foo() { - throw new UnsupportedOperationException(); - } + CharSequence foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt index 2e2cadf8e50..69889daba28 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNotNullSameJavaType: Object { -public open class AddNotNullSameJavaType : java.lang.Object() { - public open fun foo(): CharSequence? = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence? + } - public open class Sub: AddNotNullSameJavaType() { - override fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): CharSequence } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.txt index cfd5be7c7b3..3c55c46f801 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNotNullSameJavaType : java.lang.Object { - public final /*constructor*/ fun (): test.AddNotNullSameJavaType - public open fun foo(): jet.CharSequence? - public open class test.AddNotNullSameJavaType.Sub : test.AddNotNullSameJavaType { - public final /*constructor*/ fun (): test.AddNotNullSameJavaType.Sub - public open override /*1*/ fun foo(): jet.CharSequence +public abstract trait test.AddNotNullSameJavaType : java.lang.Object { + public abstract trait test.AddNotNullSameJavaType.Sub : test.AddNotNullSameJavaType.Super { + public abstract override /*1*/ fun foo(): jet.CharSequence + } + public abstract trait test.AddNotNullSameJavaType.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence? } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java index ac8fa435afb..7db8113091b 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java @@ -1,20 +1,17 @@ package test; import org.jetbrains.annotations.NotNull; -import java.lang.CharSequence; - import jet.runtime.typeinfo.KotlinSignature; -public class AddNullabilityJavaSubtype { - @NotNull - public CharSequence foo() { - throw new UnsupportedOperationException(); +public interface AddNullabilityJavaSubtype { + + public interface Super { + @NotNull + CharSequence foo(); } - public class Sub extends AddNullabilityJavaSubtype { + public interface Sub extends Super { @KotlinSignature("fun String? foo()") - public String foo() { - throw new UnsupportedOperationException(); - } + String foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt index 94564d37760..5ba781fb825 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNullabilityJavaSubtype: Object { -public open class AddNullabilityJavaSubtype : java.lang.Object() { - public open fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence + } - public open class Sub: AddNullabilityJavaSubtype() { - override fun foo(): String = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): String } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.txt index 76fcadbc6dd..05e91e8cb94 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNullabilityJavaSubtype : java.lang.Object { - public final /*constructor*/ fun (): test.AddNullabilityJavaSubtype - public open fun foo(): jet.CharSequence - public open class test.AddNullabilityJavaSubtype.Sub : test.AddNullabilityJavaSubtype { - public final /*constructor*/ fun (): test.AddNullabilityJavaSubtype.Sub - public open override /*1*/ fun foo(): jet.String +public abstract trait test.AddNullabilityJavaSubtype : java.lang.Object { + public abstract trait test.AddNullabilityJavaSubtype.Sub : test.AddNullabilityJavaSubtype.Super { + public abstract override /*1*/ fun foo(): jet.String + } + public abstract trait test.AddNullabilityJavaSubtype.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java index a6c1f6a14a9..70441f2b920 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java @@ -2,19 +2,17 @@ package test; import org.jetbrains.annotations.NotNull; import java.util.List; - import jet.runtime.typeinfo.KotlinSignature; -public class AddNullabilitySameGenericType1 { - @KotlinSignature("fun foo(): MutableList") - public List foo() { - throw new UnsupportedOperationException(); +public interface AddNullabilitySameGenericType1 { + + public interface Super { + @KotlinSignature("fun foo(): MutableList") + List foo(); } - public class Sub extends AddNullabilitySameGenericType1 { + public interface Sub extends Super { @KotlinSignature("fun foo(): MutableList") - public List foo() { - throw new UnsupportedOperationException(); - } + List foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt index d33cca238e4..3e2762854c4 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNullabilitySameGenericType1: Object { -public open class AddNullabilitySameGenericType1 : java.lang.Object() { - public open fun foo(): MutableList = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): MutableList + } - public open class Sub: AddNullabilitySameGenericType1() { - override fun foo(): MutableList = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): MutableList } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.txt index 480d73ed66d..ce1b27555aa 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNullabilitySameGenericType1 : java.lang.Object { - public final /*constructor*/ fun (): test.AddNullabilitySameGenericType1 - public open fun foo(): jet.MutableList - public open class test.AddNullabilitySameGenericType1.Sub : test.AddNullabilitySameGenericType1 { - public final /*constructor*/ fun (): test.AddNullabilitySameGenericType1.Sub - public open override /*1*/ fun foo(): jet.MutableList +public abstract trait test.AddNullabilitySameGenericType1 : java.lang.Object { + public abstract trait test.AddNullabilitySameGenericType1.Sub : test.AddNullabilitySameGenericType1.Super { + public abstract override /*1*/ fun foo(): jet.MutableList + } + public abstract trait test.AddNullabilitySameGenericType1.Super : java.lang.Object { + public abstract fun foo(): jet.MutableList } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java index 3ab85d8f6d5..e5faf33a7e1 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java @@ -2,19 +2,17 @@ package test; import org.jetbrains.annotations.NotNull; import java.util.List; - import jet.runtime.typeinfo.KotlinSignature; -public class AddNullabilitySameGenericType2 { - @KotlinSignature("fun foo(): MutableList") - public List foo() { - throw new UnsupportedOperationException(); +public interface AddNullabilitySameGenericType2 { + + public interface Super { + @KotlinSignature("fun foo(): MutableList") + List foo(); } - public class Sub extends AddNullabilitySameGenericType2 { + public interface Sub extends Super { @KotlinSignature("fun foo(): MutableList?") - public List foo() { - throw new UnsupportedOperationException(); - } + List foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt index 217e1005060..2ddaba00c5d 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNullabilitySameGenericType2: Object { -public open class AddNullabilitySameGenericType2 : java.lang.Object() { - public open fun foo(): MutableList = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): MutableList + } - public open class Sub: AddNullabilitySameGenericType2() { - override fun foo(): MutableList = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): MutableList } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.txt index 0d32f70c5c8..8ff496d5503 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNullabilitySameGenericType2 : java.lang.Object { - public final /*constructor*/ fun (): test.AddNullabilitySameGenericType2 - public open fun foo(): jet.MutableList - public open class test.AddNullabilitySameGenericType2.Sub : test.AddNullabilitySameGenericType2 { - public final /*constructor*/ fun (): test.AddNullabilitySameGenericType2.Sub - public open override /*1*/ fun foo(): jet.MutableList +public abstract trait test.AddNullabilitySameGenericType2 : java.lang.Object { + public abstract trait test.AddNullabilitySameGenericType2.Sub : test.AddNullabilitySameGenericType2.Super { + public abstract override /*1*/ fun foo(): jet.MutableList + } + public abstract trait test.AddNullabilitySameGenericType2.Super : java.lang.Object { + public abstract fun foo(): jet.MutableList } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java index 94c1f63568b..fd4f25d9cb8 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java @@ -2,19 +2,17 @@ package test; import org.jetbrains.annotations.NotNull; import java.lang.CharSequence; - import jet.runtime.typeinfo.KotlinSignature; -public class AddNullabilitySameJavaType { - @NotNull - public CharSequence foo() { - throw new UnsupportedOperationException(); +public interface AddNullabilitySameJavaType { + + public interface Super { + @NotNull + CharSequence foo(); } - public class Sub extends AddNullabilitySameJavaType { + public interface Sub extends Super { @KotlinSignature("fun CharSequence? foo()") - public CharSequence foo() { - throw new UnsupportedOperationException(); - } + CharSequence foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt index 82a06227d14..5b389cc01d8 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait AddNullabilitySameJavaType: Object { -public open class AddNullabilitySameJavaType : java.lang.Object() { - public open fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence + } - public open class Sub: AddNullabilitySameJavaType() { - override fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): CharSequence } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.txt index 67be8ff6043..8758207a181 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.txt @@ -1,10 +1,10 @@ namespace test -public open class test.AddNullabilitySameJavaType : java.lang.Object { - public final /*constructor*/ fun (): test.AddNullabilitySameJavaType - public open fun foo(): jet.CharSequence - public open class test.AddNullabilitySameJavaType.Sub : test.AddNullabilitySameJavaType { - public final /*constructor*/ fun (): test.AddNullabilitySameJavaType.Sub - public open override /*1*/ fun foo(): jet.CharSequence +public abstract trait test.AddNullabilitySameJavaType : java.lang.Object { + public abstract trait test.AddNullabilitySameJavaType.Sub : test.AddNullabilitySameJavaType.Super { + public abstract override /*1*/ fun foo(): jet.CharSequence + } + public abstract trait test.AddNullabilitySameJavaType.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java index 97b3ffa361f..8d6d563ec0b 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java @@ -6,15 +6,14 @@ import java.util.Collection; import jet.runtime.typeinfo.KotlinSignature; -public class InheritNullabilityGenericSubclassSimple { - @KotlinSignature("fun foo(): MutableCollection") - public Collection foo() { - throw new UnsupportedOperationException(); +public interface InheritNullabilityGenericSubclassSimple { + + public interface Super { + @KotlinSignature("fun foo(): MutableCollection") + Collection foo(); } - public class Sub extends InheritNullabilityGenericSubclassSimple { - public List foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List foo(); } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt index 7e5f5be3a35..9579e339cd4 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritNullabilityGenericSubclassSimple: Object { -public open class InheritNullabilityGenericSubclassSimple : java.lang.Object() { - public open fun foo(): MutableCollection = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): MutableCollection + } - public open class Sub: InheritNullabilityGenericSubclassSimple() { - override fun foo(): MutableList = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.txt index 125b878d09b..79847be7d16 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritNullabilityGenericSubclassSimple : java.lang.Object { - public final /*constructor*/ fun (): test.InheritNullabilityGenericSubclassSimple - public open fun foo(): jet.MutableCollection - public open class test.InheritNullabilityGenericSubclassSimple.Sub : test.InheritNullabilityGenericSubclassSimple { - public final /*constructor*/ fun (): test.InheritNullabilityGenericSubclassSimple.Sub - public open override /*1*/ fun foo(): jet.MutableList +public abstract trait test.InheritNullabilityGenericSubclassSimple : java.lang.Object { + public abstract trait test.InheritNullabilityGenericSubclassSimple.Sub : test.InheritNullabilityGenericSubclassSimple.Super { + public abstract override /*1*/ fun foo(): jet.MutableList + } + public abstract trait test.InheritNullabilityGenericSubclassSimple.Super : java.lang.Object { + public abstract fun foo(): jet.MutableCollection } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java index ed69d6756e4..79c9828a2bf 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java @@ -5,15 +5,14 @@ import java.lang.CharSequence; import jet.runtime.typeinfo.KotlinSignature; -public class InheritNullabilityJavaSubtype { - @NotNull - public CharSequence foo() { - throw new UnsupportedOperationException(); +public interface InheritNullabilityJavaSubtype { + + public interface Super { + @NotNull + CharSequence foo(); } - public class Sub extends InheritNullabilityJavaSubtype { - public String foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + String foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt index 1e86c2f6b40..39e87a688c8 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritNullabilityJavaSubtype: Object { -public open class InheritNullabilityJavaSubtype : java.lang.Object() { - public open fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence + } - public open class Sub: InheritNullabilityJavaSubtype() { - override fun foo(): String = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): String } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.txt index 3182223dc07..66c9a21c41a 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritNullabilityJavaSubtype : java.lang.Object { - public final /*constructor*/ fun (): test.InheritNullabilityJavaSubtype - public open fun foo(): jet.CharSequence - public open class test.InheritNullabilityJavaSubtype.Sub : test.InheritNullabilityJavaSubtype { - public final /*constructor*/ fun (): test.InheritNullabilityJavaSubtype.Sub - public open override /*1*/ fun foo(): jet.String +public abstract trait test.InheritNullabilityJavaSubtype : java.lang.Object { + public abstract trait test.InheritNullabilityJavaSubtype.Sub : test.InheritNullabilityJavaSubtype.Super { + public abstract override /*1*/ fun foo(): jet.String + } + public abstract trait test.InheritNullabilityJavaSubtype.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java index 8c4d0f1e27f..38d83d0eee0 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java @@ -5,15 +5,14 @@ import java.util.List; import jet.runtime.typeinfo.KotlinSignature; -public class InheritNullabilitySameGenericType { - @KotlinSignature("fun foo(): MutableList") - public List foo() { - throw new UnsupportedOperationException(); +public interface InheritNullabilitySameGenericType { + + public interface Super { + @KotlinSignature("fun foo(): MutableList") + List foo(); } - public class Sub extends InheritNullabilitySameGenericType { - public List foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt index 8dbc0607ad9..cb6fd289a81 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritNullabilitySameGenericType: Object { -public open class InheritNullabilitySameGenericType : java.lang.Object() { - public open fun foo(): MutableList = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): MutableList + } - public open class Sub: InheritNullabilitySameGenericType() { - override fun foo(): MutableList = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): MutableList } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.txt index d08f81b449d..2494afba14e 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritNullabilitySameGenericType : java.lang.Object { - public final /*constructor*/ fun (): test.InheritNullabilitySameGenericType - public open fun foo(): jet.MutableList - public open class test.InheritNullabilitySameGenericType.Sub : test.InheritNullabilitySameGenericType { - public final /*constructor*/ fun (): test.InheritNullabilitySameGenericType.Sub - public open override /*1*/ fun foo(): jet.MutableList +public abstract trait test.InheritNullabilitySameGenericType : java.lang.Object { + public abstract trait test.InheritNullabilitySameGenericType.Sub : test.InheritNullabilitySameGenericType.Super { + public abstract override /*1*/ fun foo(): jet.MutableList + } + public abstract trait test.InheritNullabilitySameGenericType.Super : java.lang.Object { + public abstract fun foo(): jet.MutableList } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java index e8864a494bd..b2902254194 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java @@ -5,15 +5,14 @@ import java.lang.CharSequence; import jet.runtime.typeinfo.KotlinSignature; -public class InheritNullabilitySameJavaType { - @NotNull - public CharSequence foo() { - throw new UnsupportedOperationException(); +public interface InheritNullabilitySameJavaType { + + public interface Super { + @NotNull + CharSequence foo(); } - public class Sub extends InheritNullabilitySameJavaType { - public CharSequence foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + CharSequence foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt index 2f2dacdc73c..94c08796afe 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritNullabilitySameJavaType: Object { -public open class InheritNullabilitySameJavaType : java.lang.Object() { - public open fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): CharSequence + } - public open class Sub: InheritNullabilitySameJavaType() { - override fun foo(): CharSequence = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): CharSequence } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.txt index a7122b8f382..88b0e09a614 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritNullabilitySameJavaType : java.lang.Object { - public final /*constructor*/ fun (): test.InheritNullabilitySameJavaType - public open fun foo(): jet.CharSequence - public open class test.InheritNullabilitySameJavaType.Sub : test.InheritNullabilitySameJavaType { - public final /*constructor*/ fun (): test.InheritNullabilitySameJavaType.Sub - public open override /*1*/ fun foo(): jet.CharSequence +public abstract trait test.InheritNullabilitySameJavaType : java.lang.Object { + public abstract trait test.InheritNullabilitySameJavaType.Sub : test.InheritNullabilitySameJavaType.Super { + public abstract override /*1*/ fun foo(): jet.CharSequence + } + public abstract trait test.InheritNullabilitySameJavaType.Super : java.lang.Object { + public abstract fun foo(): jet.CharSequence } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java index 022f6b651e1..0d85ce9c4cc 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java @@ -6,15 +6,14 @@ import java.util.Collection; import jet.runtime.typeinfo.KotlinSignature; -public class InheritReadOnlinessOfArgument { - @KotlinSignature("fun foo(): List>>") - public List> foo() { - throw new UnsupportedOperationException(); +public interface InheritReadOnlinessOfArgument { + + public interface Super { + @KotlinSignature("fun foo(): List>>") + List> foo(); } - public class Sub extends InheritReadOnlinessOfArgument { - public List> foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List> foo(); } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt index 28ad3bafd18..4c66b87a325 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritReadOnlinessOfArgument: Object { -public open class InheritReadOnlinessOfArgument : java.lang.Object() { - public open fun foo(): List> = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): List> + } - public open class Sub: InheritReadOnlinessOfArgument() { - override fun foo(): List> = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): List> } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.txt index 211a547fc4d..a1e0786f329 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritReadOnlinessOfArgument : java.lang.Object { - public final /*constructor*/ fun (): test.InheritReadOnlinessOfArgument - public open fun foo(): jet.List> - public open class test.InheritReadOnlinessOfArgument.Sub : test.InheritReadOnlinessOfArgument { - public final /*constructor*/ fun (): test.InheritReadOnlinessOfArgument.Sub - public open override /*1*/ fun foo(): jet.List> +public abstract trait test.InheritReadOnlinessOfArgument : java.lang.Object { + public abstract trait test.InheritReadOnlinessOfArgument.Sub : test.InheritReadOnlinessOfArgument.Super { + public abstract override /*1*/ fun foo(): jet.List> + } + public abstract trait test.InheritReadOnlinessOfArgument.Super : java.lang.Object { + public abstract fun foo(): jet.List> } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java index a069728d63f..3d7257b5183 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java @@ -6,15 +6,14 @@ import java.util.Collection; import jet.runtime.typeinfo.KotlinSignature; -public class InheritReadOnlinessSameClass { - @KotlinSignature("fun foo(): List") - public List foo() { - throw new UnsupportedOperationException(); +public interface InheritReadOnlinessSameClass { + + public interface Super { + @KotlinSignature("fun foo(): List") + List foo(); } - public class Sub extends InheritReadOnlinessSameClass { - public List foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List foo(); } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt index 0b5a9ce8601..7720625c684 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritReadOnlinessSameClass: Object { -public open class InheritReadOnlinessSameClass : java.lang.Object() { - public open fun foo(): List = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): List + } - public open class Sub: InheritReadOnlinessSameClass() { - override fun foo(): List = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): List } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.txt index b91b1cb7316..c93a24d3eb0 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritReadOnlinessSameClass : java.lang.Object { - public final /*constructor*/ fun (): test.InheritReadOnlinessSameClass - public open fun foo(): jet.List - public open class test.InheritReadOnlinessSameClass.Sub : test.InheritReadOnlinessSameClass { - public final /*constructor*/ fun (): test.InheritReadOnlinessSameClass.Sub - public open override /*1*/ fun foo(): jet.List +public abstract trait test.InheritReadOnlinessSameClass : java.lang.Object { + public abstract trait test.InheritReadOnlinessSameClass.Sub : test.InheritReadOnlinessSameClass.Super { + public abstract override /*1*/ fun foo(): jet.List + } + public abstract trait test.InheritReadOnlinessSameClass.Super : java.lang.Object { + public abstract fun foo(): jet.List } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java index 93ca1de08b1..25879931050 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java @@ -6,15 +6,14 @@ import java.util.Collection; import jet.runtime.typeinfo.KotlinSignature; -public class InheritReadOnlinessSubclass { - @KotlinSignature("fun foo(): Collection") - public Collection foo() { - throw new UnsupportedOperationException(); +public interface InheritReadOnlinessSubclass { + + public interface Super { + @KotlinSignature("fun foo(): Collection") + Collection foo(); } - public class Sub extends InheritReadOnlinessSubclass { - public List foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List foo(); } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt index b9d714dfc6c..75bbb2d4af9 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritReadOnlinessSubclass: Object { -public open class InheritReadOnlinessSubclass : java.lang.Object() { - public open fun foo(): Collection = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): Collection + } - public open class Sub: InheritReadOnlinessSubclass() { - override fun foo(): List = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): List } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.txt index 77fcaaf3325..77c970cd9c1 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritReadOnlinessSubclass : java.lang.Object { - public final /*constructor*/ fun (): test.InheritReadOnlinessSubclass - public open fun foo(): jet.Collection - public open class test.InheritReadOnlinessSubclass.Sub : test.InheritReadOnlinessSubclass { - public final /*constructor*/ fun (): test.InheritReadOnlinessSubclass.Sub - public open override /*1*/ fun foo(): jet.List +public abstract trait test.InheritReadOnlinessSubclass : java.lang.Object { + public abstract trait test.InheritReadOnlinessSubclass.Sub : test.InheritReadOnlinessSubclass.Super { + public abstract override /*1*/ fun foo(): jet.List + } + public abstract trait test.InheritReadOnlinessSubclass.Super : java.lang.Object { + public abstract fun foo(): jet.Collection } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.java index b8e13663a35..2a5b30c9db1 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.java @@ -6,15 +6,14 @@ import java.util.Collection; import jet.runtime.typeinfo.KotlinSignature; -public class InheritVariance { - @KotlinSignature("fun foo(): MutableCollection") - public Collection foo() { - throw new UnsupportedOperationException(); +public interface InheritVariance { + + public interface Super { + @KotlinSignature("fun foo(): MutableCollection") + Collection foo(); } - public class Sub extends InheritVariance { - public List foo() { - throw new UnsupportedOperationException(); - } + public interface Sub extends Super { + List foo(); } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.kt index 9aa80270851..0ccd33c89aa 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.kt @@ -1,11 +1,12 @@ package test -import org.jetbrains.annotations.NotNull +public trait InheritVariance: Object { -public open class InheritVariance : java.lang.Object() { - public open fun foo(): MutableCollection = throw UnsupportedOperationException() + public trait Super: Object { + public fun foo(): MutableCollection + } - public open class Sub: InheritVariance() { - override fun foo(): MutableList = throw UnsupportedOperationException() + public trait Sub: Super { + override fun foo(): MutableList } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.txt index d9c1ecc2fa0..fd8b84433b9 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/InheritVariance.txt @@ -1,10 +1,10 @@ namespace test -public open class test.InheritVariance : java.lang.Object { - public final /*constructor*/ fun (): test.InheritVariance - public open fun foo(): jet.MutableCollection - public open class test.InheritVariance.Sub : test.InheritVariance { - public final /*constructor*/ fun (): test.InheritVariance.Sub - public open override /*1*/ fun foo(): jet.MutableList +public abstract trait test.InheritVariance : java.lang.Object { + public abstract trait test.InheritVariance.Sub : test.InheritVariance.Super { + public abstract override /*1*/ fun foo(): jet.MutableList + } + public abstract trait test.InheritVariance.Super : java.lang.Object { + public abstract fun foo(): jet.MutableCollection } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java index 08381534b0e..0acca3a7ef1 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java @@ -1,19 +1,20 @@ package test; import org.jetbrains.annotations.NotNull; -import java.lang.CharSequence; - import jet.runtime.typeinfo.KotlinSignature; public interface TwoSuperclassesReturnJavaSubtype { - public CharSequence foo(); - public interface Other { + public interface Super1 { + public CharSequence foo(); + } + + public interface Super2 { @NotNull public CharSequence foo(); } - public interface Sub extends TwoSuperclassesReturnJavaSubtype, Other { + public interface Sub extends Super1, Super2 { public String foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt index 349d88c1a94..2a9f0a31176 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt @@ -1,15 +1,16 @@ package test -import org.jetbrains.annotations.NotNull - public trait TwoSuperclassesReturnJavaSubtype: Object { - public fun foo(): CharSequence? - public trait Other: Object { + public trait Super1: Object { + public fun foo(): CharSequence? + } + + public trait Super2: Object { public fun foo(): CharSequence } - public trait Sub: TwoSuperclassesReturnJavaSubtype, Other { + public trait Sub: Super1, Super2 { override fun foo(): String } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.txt index f32a470dc89..5cbef29a8eb 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.txt @@ -1,11 +1,13 @@ namespace test public abstract trait test.TwoSuperclassesReturnJavaSubtype : java.lang.Object { - public abstract fun foo(): jet.CharSequence? - public abstract trait test.TwoSuperclassesReturnJavaSubtype.Other : java.lang.Object { - public abstract fun foo(): jet.CharSequence - } - public abstract trait test.TwoSuperclassesReturnJavaSubtype.Sub : test.TwoSuperclassesReturnJavaSubtype, test.TwoSuperclassesReturnJavaSubtype.Other { + public abstract trait test.TwoSuperclassesReturnJavaSubtype.Sub : test.TwoSuperclassesReturnJavaSubtype.Super1, test.TwoSuperclassesReturnJavaSubtype.Super2 { public abstract override /*2*/ fun foo(): jet.String } + public abstract trait test.TwoSuperclassesReturnJavaSubtype.Super1 : java.lang.Object { + public abstract fun foo(): jet.CharSequence? + } + public abstract trait test.TwoSuperclassesReturnJavaSubtype.Super2 : java.lang.Object { + public abstract fun foo(): jet.CharSequence + } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java index a4eae041fca..5cf66081e89 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java @@ -1,19 +1,20 @@ package test; import org.jetbrains.annotations.NotNull; -import java.lang.CharSequence; - import jet.runtime.typeinfo.KotlinSignature; public interface TwoSuperclassesReturnSameJavaType { - public CharSequence foo(); - public interface Other { + public interface Super1 { + public CharSequence foo(); + } + + public interface Super2 { @NotNull public CharSequence foo(); } - public interface Sub extends TwoSuperclassesReturnSameJavaType, Other { + public interface Sub extends Super1, Super2 { public CharSequence foo(); } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt index ea58ce4172c..3173f5da2aa 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt @@ -1,15 +1,16 @@ package test -import org.jetbrains.annotations.NotNull - public trait TwoSuperclassesReturnSameJavaType: Object { - public fun foo(): CharSequence? - public trait Other: Object { + public trait Super1: Object { + public fun foo(): CharSequence? + } + + public trait Super2: Object { public fun foo(): CharSequence } - public trait Sub: TwoSuperclassesReturnSameJavaType, Other { + public trait Sub: Super1, Super2 { override fun foo(): CharSequence } } \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.txt index 699d5684d13..fa313306bb2 100644 --- a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.txt +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.txt @@ -1,11 +1,13 @@ namespace test public abstract trait test.TwoSuperclassesReturnSameJavaType : java.lang.Object { - public abstract fun foo(): jet.CharSequence? - public abstract trait test.TwoSuperclassesReturnSameJavaType.Other : java.lang.Object { - public abstract fun foo(): jet.CharSequence - } - public abstract trait test.TwoSuperclassesReturnSameJavaType.Sub : test.TwoSuperclassesReturnSameJavaType, test.TwoSuperclassesReturnSameJavaType.Other { + public abstract trait test.TwoSuperclassesReturnSameJavaType.Sub : test.TwoSuperclassesReturnSameJavaType.Super1, test.TwoSuperclassesReturnSameJavaType.Super2 { public abstract override /*2*/ fun foo(): jet.CharSequence } + public abstract trait test.TwoSuperclassesReturnSameJavaType.Super1 : java.lang.Object { + public abstract fun foo(): jet.CharSequence? + } + public abstract trait test.TwoSuperclassesReturnSameJavaType.Super2 : java.lang.Object { + public abstract fun foo(): jet.CharSequence + } }