From 97af85da9cd315063b8b6c65050d78748a48386d Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Fri, 17 Jul 2015 12:11:56 +0300 Subject: [PATCH] Change default upper bound of Java type parameters to Any! #KT-7672 Fixed --- .../AlternativeMethodSignatureData.java | 4 ++- .../class/ExtendsAbstractListT.txt | 2 +- .../class/ImplementsListString.txt | 2 +- .../method/QExtendsListString.txt | 2 +- .../method/QExtendsString.txt | 2 +- .../ValAndFunOverrideCompatibilityClash.txt | 2 +- .../collectionInheritedFromJava.txt | 4 +-- .../starProjections/inheritedFromJava.txt | 4 +-- .../capturedTypes/captureForPlatformTypes.txt | 4 +-- .../tests/j+k/GenericsInSupertypes.txt | 12 +++---- .../tests/j+k/InheritedGenericFunction.txt | 2 +- ...umentsNullability-NotNull-SpecialTypes.txt | 4 +-- ...ArgumentsNullability-NotNull-UserTypes.txt | 4 +-- ...rtypeArgumentsNullability-SpecialTypes.txt | 4 +-- ...upertypeArgumentsNullability-UserTypes.txt | 4 +-- .../diagnostics/tests/j+k/UnboxingNulls.txt | 4 +-- .../tests/j+k/computeIfAbsentConcurrent.txt | 12 +++---- .../j+k/overrideWithSamAndTypeParameter.txt | 8 ++--- .../diagnostics/tests/j+k/types/arrayList.txt | 4 +-- .../tests/j+k/types/typeParameter.txt | 2 +- .../multipleExactBoundsNullable.txt | 4 +-- .../methodTypeParameterDefaultBound.kt | 25 ++++++++++++++ .../methodTypeParameterDefaultBound.txt | 34 +++++++++++++++++++ .../methodWithTypeParameter.txt | 16 ++++----- .../saveAnnotationAfterSubstitution.txt | 4 +-- .../diagnostics/tests/scopes/visibility2.txt | 2 +- .../diagnostics/tests/subtyping/kt-1457.txt | 2 +- .../syntheticExtensions/FalseGetters.txt | 2 +- .../syntheticExtensions/FalseSetters.txt | 2 +- .../syntheticExtensions/GenericClass.txt | 4 +-- .../overrideWithFunctionalType.kt | 17 ++++++++++ .../overrideWithFunctionalType.txt | 18 ++++++++++ .../customClassMutableCollection.txt | 6 ++-- .../customClassMutableList.txt | 6 ++-- .../wrongTypeParametersCount.txt | 6 ++-- .../loadJava/compiledJava/ClassWithTypeP.txt | 4 +-- .../ClassWithTypePExtendsIterableP.txt | 4 +-- .../loadJava/compiledJava/ClassWithTypePP.txt | 4 +-- .../compiledJava/ClassWithTypePRefNext.txt | 4 +-- ...eritMethodsDifferentReturnTypesGeneric.txt | 4 +-- .../InnerClassReferencesOuterTP.txt | 4 +-- .../compiledJava/InnerClassesInGeneric.txt | 4 +-- .../loadJava/compiledJava/InnerOfGeneric.txt | 12 +++---- .../MethodReferencesOuterClassTP.txt | 4 +-- .../loadJava/compiledJava/MethodWithTypeP.txt | 2 +- .../compiledJava/MethodWithTypePP.txt | 2 +- .../compiledJava/MethodWithTypePRefClassP.txt | 4 +-- .../compiledJava/MethosWithPRefTP.txt | 2 +- .../javaBean/JavaBeanVarOfGenericType.txt | 4 +-- .../ConstructorWithNewTypeParams.txt | 4 +-- .../ConstructorWithParentTypeParams.txt | 4 +-- .../MethodWithMappedClasses.txt | 2 +- .../MethodWithTypeParameters.txt | 2 +- .../kotlinSignature/PropertyArrayTypes.txt | 4 +-- .../kotlinSignature/PropertyComplexTypes.txt | 4 +-- .../WrongTypeParameterBoundStructure1.txt | 2 +- .../WrongTypeParameterBoundStructure2.txt | 2 +- .../error/WrongTypeParametersCount.txt | 2 +- .../DeeplySubstitutedClassParameter.txt | 4 +-- .../DeeplySubstitutedClassParameter2.txt | 4 +-- .../propagation/parameter/Kt3302.txt | 2 +- .../parameter/OverrideWithErasedParameter.txt | 4 +-- .../parameter/SubclassFromGenericAndNot.txt | 2 +- .../parameter/SubstitutedClassParameter.txt | 2 +- .../parameter/SubstitutedClassParameters.txt | 4 +-- .../DeeplySubstitutedClassParameter.txt | 4 +-- .../DeeplySubstitutedClassParameter2.txt | 4 +-- .../return/HalfSubstitutedTypeParameters.txt | 2 +- .../return/SubclassFromGenericAndNot.txt | 2 +- .../return/SubclassOfCollection.txt | 2 +- .../propagation/return/SubclassOfMapEntry.txt | 2 +- .../return/SubstitutedClassParameter.txt | 2 +- .../return/SubstitutedClassParameters.txt | 4 +-- .../propagation/return/TypeParamOfClass.txt | 4 +-- .../return/TypeParamOfClassSubstituted.txt | 2 +- .../propagation/return/TypeParamOfFun.txt | 4 +-- .../UseParameterAsUpperBound.txt | 4 +-- .../UseParameterInUpperBound.txt | 4 +-- ...rameterInUpperBoundWithKotlinSignature.txt | 4 +-- .../compiledJava/library/LoadIterable.txt | 2 +- .../compiledJava/library/LoadIterator.txt | 2 +- .../modality/ModalityOfFakeOverrides.txt | 2 +- .../compiledJava/mutability/LoadIterable.txt | 2 +- .../mutability/LoadIterableWithConflict.txt | 2 +- .../LoadIterableWithNullability.txt | 2 +- .../LoadIterableWithPropagation.txt | 6 ++-- .../compiledJava/rendering/Rendering.txt | 4 +-- .../loadJava/compiledJava/sam/Comparator.txt | 4 +-- .../compiledJava/sam/SamSubinterfaceOfTwo.txt | 4 +-- .../sam/adapters/TypeParameterOfClass.txt | 4 +-- .../sam/adapters/TypeParameterOfMethod.txt | 4 +-- .../adapters/TypeParameterOfOuterClass.txt | 4 +-- .../InheritedSameAdaptersWithSubstitution.txt | 4 +-- .../signaturePropagation/ArraysInSubtypes.txt | 2 +- .../MethodTypeParameterErased.txt | 2 +- .../signaturePropagation/RawSuperType.txt | 6 ++-- ...peWithRecursiveBoundMultipleParameters.txt | 6 ++-- .../ReturnInnerSubclassOfSupersInner.txt | 8 ++--- .../modality/ModalityOfFakeOverrides.txt | 2 +- .../platformTypes/notnullTypeArgument.txt | 2 +- .../platformTypes/nullableTypeArgument.txt | 2 +- .../sourceJava/ClassExtendsTypeParameter.txt | 4 +-- .../ReturnInnerSubclassOfSupersInner.txt | 8 ++--- .../loadJava/sourceJava/ReturnNotSubtype.txt | 2 +- .../loadJava/sourceJava/TypeAnnotations.txt | 2 +- .../WrongNumberOfGenericParameters.txt | 4 +-- .../checkers/JetDiagnosticsTestGenerated.java | 6 ++++ ...JetDiagnosticsTestWithStdLibGenerated.java | 6 ++++ .../LazyJavaTypeParameterDescriptor.kt | 8 ++++- .../kotlin/builtins/KotlinBuiltIns.java | 4 +++ .../calls/inference/ConstraintSystemImpl.kt | 5 +-- .../org/jetbrains/kotlin/types/TypeUtils.kt | 4 ++- j2k/testData/fileOrElement/class/kt-639.kt | 4 +-- .../classExpression/complexExample.kt | 2 +- j2k/testData/fileOrElement/issues/kt-1048.kt | 4 +-- .../newClassExpression/fullQualifiedName.kt | 2 +- .../newClassExpression/fullQualifiedName2.kt | 2 +- .../fileOrElement/rawGenerics/kt-540-map.kt | 2 +- .../fileOrElement/rawGenerics/kt-540.kt | 2 +- 119 files changed, 326 insertions(+), 205 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt create mode 100644 compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.txt create mode 100644 compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt create mode 100644 compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.txt diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/AlternativeMethodSignatureData.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/AlternativeMethodSignatureData.java index f9f9776dcaa..9c9bf7c4293 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/AlternativeMethodSignatureData.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/AlternativeMethodSignatureData.java @@ -39,6 +39,7 @@ import org.jetbrains.kotlin.types.TypeSubstitutor; import org.jetbrains.kotlin.types.TypeUtils; import org.jetbrains.kotlin.types.Variance; import org.jetbrains.kotlin.types.checker.JetTypeChecker; +import org.jetbrains.kotlin.types.typeUtil.TypeUtilPackage; import java.util.*; @@ -254,7 +255,8 @@ public class AlternativeMethodSignatureData extends ElementAlternativeSignatureD List altUpperBounds = getUpperBounds(altFunDeclaration, altTypeParameter); if (altUpperBounds.size() != originalUpperBounds.size()) { if (altUpperBounds.isEmpty() - && originalUpperBounds.equals(Collections.singleton(KotlinBuiltIns.getInstance().getDefaultBound()))) { + && originalUpperBounds.size() == 1 + && TypeUtilPackage.isDefaultBound(originalUpperBounds.iterator().next())) { // Only default bound => no error } else { diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt b/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt index 0a34238bdb0..f75d288f656 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt @@ -32,5 +32,5 @@ internal abstract class Mine : java.util.AbstractList { public abstract /*fake_override*/ fun size(): kotlin.Int public open /*fake_override*/ fun subList(/*0*/ kotlin.Int, /*1*/ kotlin.Int): kotlin.MutableList public open /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open /*fake_override*/ fun toArray(/*0*/ kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open /*fake_override*/ fun toArray(/*0*/ kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! } diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt index c8e93e1d5fa..334b8c170c6 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt @@ -24,7 +24,7 @@ internal abstract class Mine : java.util.List { public abstract /*fake_override*/ fun size(): kotlin.Int public abstract /*fake_override*/ fun subList(/*0*/ kotlin.Int, /*1*/ kotlin.Int): kotlin.(Mutable)List! public abstract /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public abstract /*fake_override*/ fun toArray(/*0*/ kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public abstract /*fake_override*/ fun toArray(/*0*/ kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! } public/*package*/ open class PlainExtendsListString { diff --git a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.txt b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.txt index 6e83706267f..6ec96655264 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.txt +++ b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.txt @@ -6,5 +6,5 @@ public/*package*/ open class Question { public/*package*/ constructor Question() // Static members - public/*package*/ open fun id2(/*0*/ T!): T! + public/*package*/ open fun id2(/*0*/ T!): T! } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.txt b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.txt index 6701e011aef..c34ba2c9e08 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.txt +++ b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.txt @@ -6,5 +6,5 @@ public/*package*/ open class Question { public/*package*/ constructor Question() // Static members - public/*package*/ open fun id2(/*0*/ T!): T! + public/*package*/ open fun id2(/*0*/ T!): T! } diff --git a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt index eb76293c0e7..6242c0df1dc 100644 --- a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt +++ b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt @@ -59,7 +59,7 @@ internal final class Foo1 : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.txt b/compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.txt index a1307d8a9c5..807d6e42086 100644 --- a/compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.txt +++ b/compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.txt @@ -2,8 +2,8 @@ package package p { - public open class Base { - public constructor Base() + public open class Base { + public constructor Base() public/*package*/ open fun coll(/*0*/ r: kotlin.(Mutable)Collection<*>!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.txt b/compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.txt index 50b22296be6..9f3fea189b6 100644 --- a/compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.txt +++ b/compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.txt @@ -2,8 +2,8 @@ package package p { - public open class Base { - public constructor Base() + public open class Base { + public constructor Base() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public/*package*/ open fun foo(/*0*/ r: p.R<*>!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.txt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.txt index 92fe99f03c9..f16ccde2494 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.txt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.txt @@ -10,6 +10,6 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members - public open fun bar(/*0*/ clazz: java.lang.Class!): java.lang.Class!>! - public open fun foo(/*0*/ clazz: java.lang.Class!): java.lang.Class! + public open fun bar(/*0*/ clazz: java.lang.Class!): java.lang.Class!>! + public open fun foo(/*0*/ clazz: java.lang.Class!): java.lang.Class! } diff --git a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt index 28af01cb5e6..9aeb6ebe848 100644 --- a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt @@ -41,7 +41,7 @@ internal abstract class AL : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit @@ -64,23 +64,23 @@ package p { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - public open class B : p.A { - public constructor B() + public open class B : p.A { + public constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public/*package*/ open override /*1*/ fun foo(/*0*/ p: p.A): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - public open class C : p.B, p.A { - public constructor C() + public open class C : p.B, p.A { + public constructor C() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun foo(/*0*/ p: p.A): kotlin.Unit public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } - public interface G { + public interface G { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.txt b/compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.txt index 9a5ede71166..c5d0cf508c7 100644 --- a/compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.txt +++ b/compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.txt @@ -3,7 +3,7 @@ package internal abstract class K : p.C { public constructor K() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun foo(/*0*/ p: TB!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun foo(/*0*/ p: TB!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt index 8a73fb1f86b..1dd649d3215 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt @@ -9,8 +9,8 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class X { - public constructor X() +public open class X { + public constructor X() public/*package*/ open fun barN(/*0*/ org.jetbrains.annotations.NotNull() a: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean org.jetbrains.annotations.NotNull() public/*package*/ open fun fooN(): T diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt index af87cc89d5b..9fdf5fd969e 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt @@ -9,8 +9,8 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class X { - public constructor X() +public open class X { + public constructor X() public/*package*/ open fun barN(/*0*/ org.jetbrains.annotations.NotNull() a: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean org.jetbrains.annotations.NotNull() public/*package*/ open fun fooN(): T diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.txt index f24f0946946..044e04618cc 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.txt @@ -9,8 +9,8 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class X { - public constructor X() +public open class X { + public constructor X() public/*package*/ open fun bar(/*0*/ a: T!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public/*package*/ open fun foo(): T! diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.txt index 3e8a2f32d82..4533e3637f7 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.txt @@ -9,8 +9,8 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class X { - public constructor X() +public open class X { + public constructor X() public/*package*/ open fun bar(/*0*/ a: T!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public/*package*/ open fun foo(): T! diff --git a/compiler/testData/diagnostics/tests/j+k/UnboxingNulls.txt b/compiler/testData/diagnostics/tests/j+k/UnboxingNulls.txt index a2046ae0b31..c51a16d4b26 100644 --- a/compiler/testData/diagnostics/tests/j+k/UnboxingNulls.txt +++ b/compiler/testData/diagnostics/tests/j+k/UnboxingNulls.txt @@ -3,8 +3,8 @@ package package a { internal fun foo(): kotlin.Unit - public open class Test { - public constructor Test() + public open class Test { + public constructor Test() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public/*package*/ open fun t(): T! diff --git a/compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.txt b/compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.txt index e66188e9423..971686de9cd 100644 --- a/compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.txt +++ b/compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.txt @@ -1,11 +1,11 @@ package -public /*synthesized*/ fun ConcMap(/*0*/ function: (K!, MyFunc!) -> V!): ConcMap -public /*synthesized*/ fun MyFunc(/*0*/ function: (K!) -> V!): MyFunc +public /*synthesized*/ fun ConcMap(/*0*/ function: (K!, MyFunc!) -> V!): ConcMap +public /*synthesized*/ fun MyFunc(/*0*/ function: (K!) -> V!): MyFunc public fun concurrentMap(): kotlin.Unit -public open class ConcHashMap : ConcMap { - public constructor ConcHashMap() +public open class ConcHashMap : ConcMap { + public constructor ConcHashMap() java.lang.Override() public/*package*/ final override /*1*/ /*synthesized*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: ((K!) -> V!)!): V! java.lang.Override() public/*package*/ open override /*1*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: MyFunc!): V! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -13,7 +13,7 @@ public open class ConcHashMap : ConcMap { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public interface ConcMap { +public interface ConcMap { public final /*synthesized*/ fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: ((K!) -> V!)!): V! public abstract fun computeIfAbsent(/*0*/ key: K!, /*1*/ mappingFunction: MyFunc!): V! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -21,7 +21,7 @@ public interface ConcMap { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public interface MyFunc { +public interface MyFunc { public abstract fun apply(/*0*/ String: K!): V! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.txt b/compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.txt index fb416b164fe..0271562cc76 100644 --- a/compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.txt @@ -1,10 +1,10 @@ package -public /*synthesized*/ fun A(/*0*/ function: (K!, MyFunc!) -> K!): A +public /*synthesized*/ fun A(/*0*/ function: (K!, MyFunc!) -> K!): A public /*synthesized*/ fun MyFunc(/*0*/ function: (kotlin.String!) -> kotlin.String!): MyFunc internal fun main(): kotlin.Unit -public interface A { +public interface A { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final /*synthesized*/ fun foo(/*0*/ key: K!, /*1*/ f: ((kotlin.String!) -> kotlin.String!)!): K! public abstract fun foo(/*0*/ key: K!, /*1*/ f: MyFunc!): K! @@ -12,8 +12,8 @@ public interface A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class B : A { - public constructor B() +public open class B : A { + public constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean java.lang.Override() public final override /*1*/ /*synthesized*/ fun foo(/*0*/ key: E!, /*1*/ f: ((kotlin.String!) -> kotlin.String!)!): E! java.lang.Override() public open override /*1*/ fun foo(/*0*/ key: E!, /*1*/ f: MyFunc!): E! diff --git a/compiler/testData/diagnostics/tests/j+k/types/arrayList.txt b/compiler/testData/diagnostics/tests/j+k/types/arrayList.txt index 793d26b1e99..bf4e205332e 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/arrayList.txt +++ b/compiler/testData/diagnostics/tests/j+k/types/arrayList.txt @@ -1,7 +1,7 @@ package -public/*package*/ open class J : ML { - public/*package*/ constructor J() +public/*package*/ open class J : ML { + public/*package*/ constructor J() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ fun foo(): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/j+k/types/typeParameter.txt b/compiler/testData/diagnostics/tests/j+k/types/typeParameter.txt index d96e7b10deb..b3da72dff9a 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/typeParameter.txt +++ b/compiler/testData/diagnostics/tests/j+k/types/typeParameter.txt @@ -2,7 +2,7 @@ package public/*package*/ interface J : K { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*1*/ fun foo(/*0*/ t: T): kotlin.Unit + public abstract override /*1*/ fun foo(/*0*/ t: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt index 381ec125c74..c260bc7032e 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt @@ -2,8 +2,8 @@ package internal fun foo(/*0*/ delegateResolver: ResolverForProject): ResolverForProject -public/*package*/ open class MyMap : java.util.AbstractMap { - public/*package*/ constructor MyMap() +public/*package*/ open class MyMap : java.util.AbstractMap { + public/*package*/ constructor MyMap() invisible_fake final override /*1*/ /*fake_override*/ var keySet: kotlin.(Mutable)Set! invisible_fake final override /*1*/ /*fake_override*/ var values: kotlin.(Mutable)Collection! public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt b/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt new file mode 100644 index 00000000000..593085cf2d9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt @@ -0,0 +1,25 @@ +// FILE: Derived.java +import kotlin.jvm.functions.Function0; +import org.jetbrains.annotations.NotNull; + +public class Derived implements Base { + @Override + public void foo() {} +} + +// FILE: main.kt +interface Base { + fun foo() +} + +class KotlinDerived1 : Derived() { + override fun foo() {} +} + +class KotlinDerived2 : Derived() { + override fun foo() {} +} + +fun main(args: Array) { + Derived().foo() +} diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.txt b/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.txt new file mode 100644 index 00000000000..e7cbece5269 --- /dev/null +++ b/compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.txt @@ -0,0 +1,34 @@ +package + +internal fun main(/*0*/ args: kotlin.Array): kotlin.Unit + +internal interface Base { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + internal abstract fun foo(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Derived : Base { + public constructor Derived() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + java.lang.Override() public open override /*1*/ fun foo(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +internal final class KotlinDerived1 : Derived { + public constructor KotlinDerived1() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ fun foo(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +internal final class KotlinDerived2 : Derived { + public constructor KotlinDerived2() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ fun foo(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/methodWithTypeParameter.txt b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/methodWithTypeParameter.txt index 1621e611eb6..d9ddfe58659 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/methodWithTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/methodWithTypeParameter.txt @@ -8,36 +8,36 @@ public/*package*/ open class Outer { public/*package*/ open inner class A { public/*package*/ constructor A() - public/*package*/ open fun bar(/*0*/ x: Y!): X! + public/*package*/ open fun bar(/*0*/ x: Y!): X! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public/*package*/ open fun foo(/*0*/ x: K!): V! + public/*package*/ open fun foo(/*0*/ x: K!): V! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } public/*package*/ open inner class B : Outer.A { public/*package*/ constructor B() - java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ org.jetbrains.annotations.NotNull() x: Y): X? + java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ org.jetbrains.annotations.NotNull() x: Y): X? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - java.lang.Override() public/*package*/ open override /*1*/ fun foo(/*0*/ org.jetbrains.annotations.Nullable() x: T1?): T2 + java.lang.Override() public/*package*/ open override /*1*/ fun foo(/*0*/ org.jetbrains.annotations.Nullable() x: T1?): T2 public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } public/*package*/ open inner class C : Outer.B { public/*package*/ constructor C() - java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ x: Y): X? + java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ x: Y): X? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - java.lang.Override() public/*package*/ open override /*1*/ fun foo(/*0*/ x: I?): J + java.lang.Override() public/*package*/ open override /*1*/ fun foo(/*0*/ x: I?): J public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } public/*package*/ open inner class D : Outer.C { public/*package*/ constructor D() - java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ org.jetbrains.annotations.Nullable() x: Y!): X + java.lang.Override() public/*package*/ open override /*1*/ fun bar(/*0*/ org.jetbrains.annotations.Nullable() x: Y!): X public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - java.lang.Override() org.jetbrains.annotations.NotNull() public/*package*/ open override /*1*/ fun foo(/*0*/ org.jetbrains.annotations.Nullable() x: U?): W + java.lang.Override() org.jetbrains.annotations.NotNull() public/*package*/ open override /*1*/ fun foo(/*0*/ org.jetbrains.annotations.Nullable() x: U?): W public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt index a9a6a6124a4..4774675cd72 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt @@ -1,11 +1,11 @@ package -public/*package*/ /*synthesized*/ fun A(/*0*/ function: (T!, T!) -> kotlin.Unit): A +public/*package*/ /*synthesized*/ fun A(/*0*/ function: (T!, T!) -> kotlin.Unit): A public/*package*/ /*synthesized*/ fun B1(/*0*/ function: (kotlin.String!, kotlin.String?) -> kotlin.Unit): B1 public/*package*/ /*synthesized*/ fun B2(/*0*/ function: (kotlin.String!, kotlin.String!) -> kotlin.Unit): B2 public/*package*/ /*synthesized*/ fun B3(/*0*/ function: (kotlin.String!, kotlin.String!) -> kotlin.Unit): B3 -public/*package*/ interface A { +public/*package*/ interface A { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public abstract fun foo(/*0*/ org.jetbrains.annotations.NotNull() x: T, /*1*/ org.jetbrains.annotations.Nullable() y: T?): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/scopes/visibility2.txt b/compiler/testData/diagnostics/tests/scopes/visibility2.txt index 05bfe99c825..899316d9b46 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility2.txt +++ b/compiler/testData/diagnostics/tests/scopes/visibility2.txt @@ -72,7 +72,7 @@ package b { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt index 6a2b7303465..73729785bb6 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt +++ b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt @@ -43,7 +43,7 @@ internal final class MyListOfPairs : java.util.ArrayList> { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList> public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/FalseGetters.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/FalseGetters.txt index 808b3d6d7a4..f9bdb03efdf 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/FalseGetters.txt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/FalseGetters.txt @@ -6,7 +6,7 @@ public open class JavaClass { public constructor JavaClass() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open fun getSomething1(/*0*/ p: kotlin.Int): kotlin.Int - public open fun getSomething2(): T! + public open fun getSomething2(): T! public open fun getSomethingVoid(): kotlin.Unit public open fun getter(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/FalseSetters.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/FalseSetters.txt index 9493dc52099..0649d833b2a 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/FalseSetters.txt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/FalseSetters.txt @@ -15,7 +15,7 @@ public open class JavaClass { public open fun setSomething1(/*0*/ value: kotlin.Int, /*1*/ c: kotlin.Char): kotlin.Unit public open fun setSomething2(/*0*/ value: kotlin.String!): kotlin.Unit public open fun setSomething3(/*0*/ value: kotlin.Int): kotlin.Int - public open fun setSomething4(/*0*/ value: kotlin.Int): kotlin.Unit + public open fun setSomething4(/*0*/ value: kotlin.Int): kotlin.Unit public open fun setSomething6(/*0*/ vararg value: kotlin.Int /*kotlin.IntArray!*/): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/GenericClass.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/GenericClass.txt index 7f43ca97e8a..254eabaeb86 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/GenericClass.txt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/GenericClass.txt @@ -2,8 +2,8 @@ package internal fun foo(/*0*/ javaClass: JavaClass): kotlin.Unit -public open class JavaClass { - public constructor JavaClass() +public open class JavaClass { + public constructor JavaClass() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open fun getSomething(): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt b/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt new file mode 100644 index 00000000000..c06f22b3d8d --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt @@ -0,0 +1,17 @@ +// FILE: Derived.java +import kotlin.jvm.functions.Function0; +import org.jetbrains.annotations.NotNull; + +public class Derived implements Base { + @Override + public void foo(@NotNull Function0 compute) {} +} + +// FILE: main.kt +interface Base { + fun foo(compute: () -> V?) +} + +fun main(args: Array) { + Derived().foo { "" } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.txt b/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.txt new file mode 100644 index 00000000000..f3e9cc8d9a4 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.txt @@ -0,0 +1,18 @@ +package + +internal fun main(/*0*/ args: kotlin.Array): kotlin.Unit + +internal interface Base { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + internal abstract fun foo(/*0*/ compute: () -> V?): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Derived : Base { + public constructor Derived() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + java.lang.Override() public open override /*1*/ fun foo(/*0*/ org.jetbrains.annotations.NotNull() compute: () -> V?): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt index c8966bb576a..3804623496d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt @@ -3,8 +3,8 @@ package internal fun bar(): kotlin.String? internal fun foo(): kotlin.Unit -kotlin.jvm.PurelyImplements(value = "kotlin.MutableCollection") public/*package*/ open class A : java.util.AbstractCollection, kotlin.MutableCollection { - public/*package*/ constructor A() +kotlin.jvm.PurelyImplements(value = "kotlin.MutableCollection") public/*package*/ open class A : java.util.AbstractCollection, kotlin.MutableCollection { + public/*package*/ constructor A() public open override /*2*/ /*fake_override*/ fun add(/*0*/ e: T): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun clear(): kotlin.Unit @@ -19,6 +19,6 @@ kotlin.jvm.PurelyImplements(value = "kotlin.MutableCollection") public/*package* public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ c: kotlin.Collection): kotlin.Boolean java.lang.Override() public open override /*2*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt index 41c160f2daf..8ffb6d1af26 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt @@ -3,8 +3,8 @@ package internal fun bar(): kotlin.String? internal fun foo(): kotlin.Unit -kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList, kotlin.MutableList { - public/*package*/ constructor A() +kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList, kotlin.MutableList { + public/*package*/ constructor A() protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*2*/ /*fake_override*/ fun add(/*0*/ e: T): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: T): kotlin.Unit @@ -33,6 +33,6 @@ kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open java.lang.Override() public open override /*2*/ fun size(): kotlin.Int public open override /*2*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt index 436b84b19f5..672ca309e56 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt @@ -3,8 +3,8 @@ package internal fun bar(): kotlin.String? internal fun foo(): kotlin.Unit -kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList { - public/*package*/ constructor A() +kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList { + public/*package*/ constructor A() protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: T!): kotlin.Unit @@ -33,6 +33,6 @@ kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open java.lang.Override() public open override /*1*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypeP.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypeP.txt index d210d16c87d..42c1a379f6f 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypeP.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypeP.txt @@ -1,5 +1,5 @@ package test -public final class ClassWithTypeP { - public constructor ClassWithTypeP() +public final class ClassWithTypeP { + public constructor ClassWithTypeP() } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt index aaf0c788b2a..fa9fe07e7c3 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt @@ -1,6 +1,6 @@ package test -public abstract class ClassWithTypePExtendsIterableP : kotlin.MutableIterable { - public constructor ClassWithTypePExtendsIterableP() +public abstract class ClassWithTypePExtendsIterableP : kotlin.MutableIterable { + public constructor ClassWithTypePExtendsIterableP() public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt index 9921b69714e..452915a61e1 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt @@ -1,5 +1,5 @@ package test -public final class ClassWithTypePP { - public constructor ClassWithTypePP() +public final class ClassWithTypePP { + public constructor ClassWithTypePP() } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt index c9c4b67e5bb..529274b2f21 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt @@ -1,5 +1,5 @@ package test -public open class ClassWithTypePRefNext!, /*1*/ P> { - public constructor ClassWithTypePRefNext!, /*1*/ P>() +public open class ClassWithTypePRefNext!, /*1*/ P : kotlin.Any!> { + public constructor ClassWithTypePRefNext!, /*1*/ P : kotlin.Any!>() } diff --git a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt index 74e027a740c..5d0e56c256f 100644 --- a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt @@ -8,12 +8,12 @@ public final class InheritMethodsDifferentReturnTypesGeneric { public abstract override /*2*/ /*fake_override*/ fun foo(): kotlin.String! } - public interface Super1 { + public interface Super1 { public abstract fun bar(): B! public abstract fun foo(): F! } - public interface Super2 { + public interface Super2 { public abstract fun bar(): BB! public abstract fun foo(): FF! } diff --git a/compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.txt b/compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.txt index 8449349a102..9956d0c0a11 100644 --- a/compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.txt +++ b/compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.txt @@ -1,7 +1,7 @@ package test -public open class InnerClassReferencesOuterTP { - public constructor InnerClassReferencesOuterTP() +public open class InnerClassReferencesOuterTP { + public constructor InnerClassReferencesOuterTP() public open inner class Inner { public constructor Inner() diff --git a/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt b/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt index a77fb7f3dc3..51954261ccb 100644 --- a/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt @@ -1,7 +1,7 @@ package test -public open class InnerClassesInGeneric { - public constructor InnerClassesInGeneric() +public open class InnerClassesInGeneric { + public constructor InnerClassesInGeneric() public open inner class Inner { public constructor Inner() diff --git a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt index 2eaf5dd8f8d..f022d8b3f85 100644 --- a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt @@ -3,8 +3,8 @@ package test public open class InnerOfGeneric { public constructor InnerOfGeneric() - public abstract inner class A { - public constructor A() + public abstract inner class A { + public constructor A() public abstract inner class Inner : test.InnerOfGeneric.S { public constructor Inner() @@ -12,8 +12,8 @@ public open class InnerOfGeneric { } } - public open inner class B : test.InnerOfGeneric.A { - public constructor B() + public open inner class B : test.InnerOfGeneric.A { + public constructor B() public open inner class SubInner : test.InnerOfGeneric.A.Inner { public constructor SubInner() @@ -21,8 +21,8 @@ public open class InnerOfGeneric { } } - public open inner class S { - public constructor S() + public open inner class S { + public constructor S() public open fun iterator(): kotlin.(Mutable)Iterator! } } diff --git a/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt b/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt index 9da1146ef5f..722741bc35f 100644 --- a/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt @@ -1,7 +1,7 @@ package test -public final class MethodReferencesOuterClassTP { - public constructor MethodReferencesOuterClassTP() +public final class MethodReferencesOuterClassTP { + public constructor MethodReferencesOuterClassTP() public final inner class Inner { public constructor Inner() diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypeP.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypeP.txt index 05849efead9..3747897ecf7 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypeP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypeP.txt @@ -2,5 +2,5 @@ package test public final class MethodWithTypeP { public constructor MethodWithTypeP() - public final fun f(): kotlin.Unit + public final fun f(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt index 3384c76e783..dc3f00f060d 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt @@ -2,5 +2,5 @@ package test public final class MethodWithTypePP { public constructor MethodWithTypePP() - public final fun f(): kotlin.Unit + public final fun f(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt index 3b0e3580d34..aee360a309d 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt @@ -1,6 +1,6 @@ package test -public open class MethodWithTypePRefClassP { - public constructor MethodWithTypePRefClassP() +public open class MethodWithTypePRefClassP { + public constructor MethodWithTypePRefClassP() public final fun f(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt index 83de328230d..fe40c0ccf41 100644 --- a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt +++ b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt @@ -2,5 +2,5 @@ package test public final class MethosWithPRefTP { public constructor MethosWithPRefTP() - public final fun f(/*0*/ p0: P!): kotlin.Unit + public final fun f(/*0*/ p0: P!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt index 72cbd7fe749..36c873abbaa 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt @@ -1,7 +1,7 @@ package test -public open class JavaBeanVarOfGenericType { - public constructor JavaBeanVarOfGenericType() +public open class JavaBeanVarOfGenericType { + public constructor JavaBeanVarOfGenericType() public open fun getCharacters(): java.util.ArrayList! public open fun setCharacters(/*0*/ p0: java.util.ArrayList!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.txt index c788eaf8de0..9d778b862ad 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.txt @@ -1,5 +1,5 @@ package test -public open class ConstructorWithNewTypeParams { - public constructor ConstructorWithNewTypeParams(/*0*/ first: kotlin.Any!) +public open class ConstructorWithNewTypeParams { + public constructor ConstructorWithNewTypeParams(/*0*/ first: kotlin.Any!) } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.txt index b4cc072ad29..389d0945856 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.txt @@ -1,5 +1,5 @@ package test -public open class ConstructorWithParentTypeParams { - public constructor ConstructorWithParentTypeParams(/*0*/ first: T!) +public open class ConstructorWithParentTypeParams { + public constructor ConstructorWithParentTypeParams(/*0*/ first: T!) } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.txt index ff5ea05cdd9..c660b7bdff6 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.txt @@ -2,5 +2,5 @@ package test public open class MethodWithMappedClasses { public constructor MethodWithMappedClasses() - public open fun copy(/*0*/ dest: (kotlin.MutableList..kotlin.List<*>?), /*1*/ src: kotlin.(Mutable)List!): kotlin.Unit + public open fun copy(/*0*/ dest: (kotlin.MutableList..kotlin.List<*>?), /*1*/ src: kotlin.(Mutable)List!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.txt index 8c2a3a0006c..99cd3dd8e09 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.txt @@ -2,5 +2,5 @@ package test public open class MethodWithTypeParameters { public constructor MethodWithTypeParameters() - public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?), /*2*/ c: (kotlin.MutableList..kotlin.List<*>?)): kotlin.Unit where B : kotlin.(Mutable)List! + public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?), /*2*/ c: (kotlin.MutableList..kotlin.List<*>?)): kotlin.Unit where B : kotlin.(Mutable)List! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.txt index a40f423ce31..74b562d83dc 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.txt @@ -1,7 +1,7 @@ package test -public open class PropertyArrayTypes { - public constructor PropertyArrayTypes() +public open class PropertyArrayTypes { + public constructor PropertyArrayTypes() public final var array: kotlin.Array<(out) kotlin.String!>! public final var arrayOfArrays: kotlin.Array<(out) kotlin.Array<(out) kotlin.String!>!>! public final var genericArray: kotlin.Array<(out) T!>! diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.txt index a5286b41794..64c491417fa 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.txt @@ -1,7 +1,7 @@ package test -public open class PropertyComplexTypes { - public constructor PropertyComplexTypes() +public open class PropertyComplexTypes { + public constructor PropertyComplexTypes() public final var genericType: T! public final var listDefinedGeneric: java.util.ArrayList! public final var listGeneric: java.util.ArrayList! diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt index caa01f2edbc..bd0385deadd 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParameterBoundStructure1 { public constructor WrongTypeParameterBoundStructure1() - public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! + public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt index 46bef27be50..cecfafd6c3e 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParameterBoundStructure2 { public constructor WrongTypeParameterBoundStructure2() - public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! + public open fun foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt index 6bbe503b2bf..c22e8929287 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParametersCount { public constructor WrongTypeParametersCount() - public open fun foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList..kotlin.List?)): kotlin.Unit + public open fun foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList..kotlin.List?)): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.txt index e4fa9a1abf9..246b150bbdd 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.txt @@ -2,7 +2,7 @@ package test public interface DeeplySubstitutedClassParameter { - public interface Middle : test.DeeplySubstitutedClassParameter.Super { + public interface Middle : test.DeeplySubstitutedClassParameter.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ fun foo(/*0*/ t: E!): kotlin.Unit } @@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter { public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ t: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.txt index 5dea6d49d80..b261fdd1fcc 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.txt @@ -2,7 +2,7 @@ package test public interface DeeplySubstitutedClassParameter2 { - public interface Middle : test.DeeplySubstitutedClassParameter2.Super { + public interface Middle : test.DeeplySubstitutedClassParameter2.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ t: E!): kotlin.Unit } @@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter2 { public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ t: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.txt index c8baccc2a06..35b16508334 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.txt @@ -12,7 +12,7 @@ public interface Kt3302 { public abstract override /*2*/ fun put(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Any): kotlin.Any! } - public interface LinkedHashMap { + public interface LinkedHashMap { public abstract fun dummy(): kotlin.Unit public abstract fun put(/*0*/ key: K!, /*1*/ value: V!): V! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.txt index 1b610a0186c..75a1356f50b 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.txt @@ -2,13 +2,13 @@ package test public interface OverrideWithErasedParameter { - public interface Sub : test.OverrideWithErasedParameter.Super { + public interface Sub : test.OverrideWithErasedParameter.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: T!): kotlin.Unit public abstract fun foo(/*0*/ p0: kotlin.Any!): kotlin.Unit } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ p0: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.txt index ef69af33b02..812b5a03686 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.txt @@ -2,7 +2,7 @@ package test public interface SubclassFromGenericAndNot { - public interface Generic { + public interface Generic { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ key: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.txt index aaf54cd7aef..3a17e502380 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.txt @@ -7,7 +7,7 @@ public interface SubstitutedClassParameter { public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ t: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.txt index 55cd379633b..cbbd1b67c75 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.txt @@ -7,12 +7,12 @@ public interface SubstitutedClassParameters { public abstract override /*2*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit } - public interface Super1 { + public interface Super1 { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ t: T!): kotlin.Unit } - public interface Super2 { + public interface Super2 { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ t: E!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.txt index b262cfb0644..453ba8bc231 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.txt @@ -2,7 +2,7 @@ package test public interface DeeplySubstitutedClassParameter { - public interface Middle : test.DeeplySubstitutedClassParameter.Super { + public interface Middle : test.DeeplySubstitutedClassParameter.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ fun foo(): E! } @@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter { public abstract override /*1*/ fun foo(): kotlin.String! } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): T! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.txt index 7d84f8f99b1..73e3ab3388e 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.txt @@ -2,7 +2,7 @@ package test public interface DeeplySubstitutedClassParameter2 { - public interface Middle : test.DeeplySubstitutedClassParameter2.Super { + public interface Middle : test.DeeplySubstitutedClassParameter2.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun foo(): E! } @@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter2 { public abstract override /*1*/ fun foo(): kotlin.String! } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): T! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt index 000cfa004d1..741add5b8cb 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt @@ -12,7 +12,7 @@ public interface HalfSubstitutedTypeParameters { public abstract fun foo(): kotlin.(Mutable)List! } - public interface TrickyList : kotlin.MutableList { + public interface TrickyList : kotlin.MutableList { public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: E!): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.txt index 4f6be4fe5dd..3e0a285ef26 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.txt @@ -2,7 +2,7 @@ package test public interface SubclassFromGenericAndNot { - public interface Generic { + public interface Generic { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): T! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt index 4aaff4269d9..e1a82e79663 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt @@ -1,6 +1,6 @@ package test -public interface SubclassOfCollection : kotlin.MutableCollection { +public interface SubclassOfCollection : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.txt index 4de9be0dace..6778a7b7507 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.txt @@ -1,6 +1,6 @@ package test -public interface SubclassOfMapEntry : kotlin.MutableMap.MutableEntry { +public interface SubclassOfMapEntry : kotlin.MutableMap.MutableEntry { public abstract override /*1*/ /*fake_override*/ fun getKey(): K! public abstract override /*1*/ /*fake_override*/ fun getValue(): V! public abstract override /*1*/ fun setValue(/*0*/ value: V!): V! diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.txt index 4c591215096..be3e1bb3fbb 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.txt @@ -7,7 +7,7 @@ public interface SubstitutedClassParameter { public abstract override /*1*/ fun foo(): kotlin.String! } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): T! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.txt index ab840786f73..b0cd1c32d19 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.txt @@ -7,12 +7,12 @@ public interface SubstitutedClassParameters { public abstract override /*2*/ fun foo(): kotlin.String! } - public interface Super1 { + public interface Super1 { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): T! } - public interface Super2 { + public interface Super2 { public abstract fun dummy(): kotlin.Unit public abstract fun foo(): E! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt index 73432c13ca7..9e7f46fefd4 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt @@ -2,12 +2,12 @@ package test public interface TypeParamOfClass { - public interface Sub : test.TypeParamOfClass.Super { + public interface Sub : test.TypeParamOfClass.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit public abstract override /*1*/ fun foo(): T! } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit org.jetbrains.annotations.NotNull() public abstract fun foo(): T } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt index 2a7210129e7..8c533a2a9f4 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt @@ -7,7 +7,7 @@ public interface TypeParamOfClassSubstituted { public abstract override /*1*/ fun foo(): kotlin.String! } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit org.jetbrains.annotations.NotNull() public abstract fun foo(): T } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt index cf25cb6eb92..dc2b51b335d 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt @@ -4,11 +4,11 @@ public interface TypeParamOfFun { public interface Sub : test.TypeParamOfFun.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit - public abstract override /*1*/ fun foo(): E + public abstract override /*1*/ fun foo(): E } public interface Super { public abstract fun dummy(): kotlin.Unit - org.jetbrains.annotations.NotNull() public abstract fun foo(): T + org.jetbrains.annotations.NotNull() public abstract fun foo(): T } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt index 4f180b9f81e..5c31618aff5 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt @@ -3,10 +3,10 @@ package test public interface UseParameterAsUpperBound { public interface Sub : test.UseParameterAsUpperBound.Super { - public abstract override /*1*/ fun foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit + public abstract override /*1*/ fun foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit } public interface Super { - public abstract fun foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit + public abstract fun foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt index b418598ea9d..54629dca4fa 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt @@ -3,10 +3,10 @@ package test public interface UseParameterInUpperBound { public interface Sub : test.UseParameterInUpperBound.Super { - public abstract override /*1*/ fun !> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit + public abstract override /*1*/ fun !> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit } public interface Super { - public abstract fun !> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit + public abstract fun !> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt index 13c326075d4..99c799d7603 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt @@ -3,10 +3,10 @@ package test public interface UseParameterInUpperBoundWithKotlinSignature { public interface Sub : test.UseParameterInUpperBoundWithKotlinSignature.Super { - public abstract override /*1*/ fun !> foo(/*0*/ b: B!, /*1*/ a: A!): kotlin.Unit + public abstract override /*1*/ fun !> foo(/*0*/ b: B!, /*1*/ a: A!): kotlin.Unit } public interface Super { - public abstract fun !> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit + public abstract fun !> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/library/LoadIterable.txt b/compiler/testData/loadJava/compiledJava/library/LoadIterable.txt index 941a5697b81..9efcfee7f76 100644 --- a/compiler/testData/loadJava/compiledJava/library/LoadIterable.txt +++ b/compiler/testData/loadJava/compiledJava/library/LoadIterable.txt @@ -1,6 +1,6 @@ package test -public interface LoadIterable { +public interface LoadIterable { public abstract fun getIterable(): kotlin.(Mutable)Iterable! public abstract fun setIterable(/*0*/ p0: kotlin.(Mutable)Iterable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/library/LoadIterator.txt b/compiler/testData/loadJava/compiledJava/library/LoadIterator.txt index 3230b977830..2a505d12b57 100644 --- a/compiler/testData/loadJava/compiledJava/library/LoadIterator.txt +++ b/compiler/testData/loadJava/compiledJava/library/LoadIterator.txt @@ -1,6 +1,6 @@ package test -public interface LoadIterator { +public interface LoadIterator { public abstract fun getIterator(): kotlin.(Mutable)Iterator! public abstract fun setIterator(/*0*/ p0: kotlin.(Mutable)Iterator!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt index 310024e6e0b..0944eda3a7d 100644 --- a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt @@ -28,5 +28,5 @@ public open class ModalityOfFakeOverrides : java.util.AbstractList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! } diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.txt index 36940f5e657..0113861c3f9 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.txt @@ -1,6 +1,6 @@ package test -public interface LoadIterable { +public interface LoadIterable { org.jetbrains.annotations.Mutable() public abstract fun getIterable(): kotlin.MutableIterable! org.jetbrains.annotations.ReadOnly() public abstract fun getReadOnlyIterable(): kotlin.Iterable! public abstract fun setIterable(/*0*/ org.jetbrains.annotations.Mutable() p0: kotlin.MutableIterable!): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.txt index 0d0b8971592..d72de5dae7e 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.txt @@ -1,6 +1,6 @@ package test -public interface LoadIterableWithConflict { +public interface LoadIterableWithConflict { org.jetbrains.annotations.ReadOnly() org.jetbrains.annotations.Mutable() public abstract fun getIterable(): kotlin.(Mutable)Iterable! public abstract fun setIterable(/*0*/ org.jetbrains.annotations.ReadOnly() org.jetbrains.annotations.Mutable() p0: kotlin.(Mutable)Iterable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.txt index f100a0859c1..9a7c25dc677 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.txt @@ -1,6 +1,6 @@ package test -public interface LoadIterableWithNullability { +public interface LoadIterableWithNullability { org.jetbrains.annotations.NotNull() org.jetbrains.annotations.Mutable() public abstract fun getIterable(): kotlin.MutableIterable org.jetbrains.annotations.NotNull() org.jetbrains.annotations.ReadOnly() public abstract fun getReadOnlyIterable(): kotlin.Iterable public abstract fun setIterable(/*0*/ org.jetbrains.annotations.Mutable() org.jetbrains.annotations.NotNull() p0: kotlin.MutableIterable): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.txt index b60f86b8058..e4288fdec2e 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.txt @@ -2,15 +2,15 @@ package test public interface LoadIterableWithPropagation { - public interface LoadIterable { + public interface LoadIterable { org.jetbrains.annotations.Mutable() public abstract fun getIterable(): kotlin.MutableIterable! org.jetbrains.annotations.ReadOnly() public abstract fun getReadOnlyIterable(): kotlin.Iterable! public abstract fun setIterable(/*0*/ org.jetbrains.annotations.Mutable() p0: kotlin.MutableIterable!): kotlin.Unit public abstract fun setReadOnlyIterable(/*0*/ org.jetbrains.annotations.ReadOnly() p0: kotlin.Iterable!): kotlin.Unit } - public open class LoadIterableImpl : test.LoadIterableWithPropagation.LoadIterable { - public constructor LoadIterableImpl() + public open class LoadIterableImpl : test.LoadIterableWithPropagation.LoadIterable { + public constructor LoadIterableImpl() public open override /*1*/ fun getIterable(): kotlin.MutableIterable! public open override /*1*/ fun getReadOnlyIterable(): kotlin.Iterable! public open override /*1*/ fun setIterable(/*0*/ p0: kotlin.MutableIterable!): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledJava/rendering/Rendering.txt b/compiler/testData/loadJava/compiledJava/rendering/Rendering.txt index 3af117372e1..c9906dedb0d 100644 --- a/compiler/testData/loadJava/compiledJava/rendering/Rendering.txt +++ b/compiler/testData/loadJava/compiledJava/rendering/Rendering.txt @@ -15,8 +15,8 @@ public open class Rendering { public/*package*/ constructor C_Sub() } - public/*package*/ open inner class D_SuperG { - public/*package*/ constructor D_SuperG() + public/*package*/ open inner class D_SuperG { + public/*package*/ constructor D_SuperG() } public/*package*/ open inner class E_SubG : test.Rendering.D_SuperG { diff --git a/compiler/testData/loadJava/compiledJava/sam/Comparator.txt b/compiler/testData/loadJava/compiledJava/sam/Comparator.txt index 29d15ec641b..66e186f9db9 100644 --- a/compiler/testData/loadJava/compiledJava/sam/Comparator.txt +++ b/compiler/testData/loadJava/compiledJava/sam/Comparator.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun Comparator(/*0*/ function: (T!, T!) -> kotlin.Int): test.Comparator +public /*synthesized*/ fun Comparator(/*0*/ function: (T!, T!) -> kotlin.Int): test.Comparator -public interface Comparator { +public interface Comparator { public abstract fun compare(/*0*/ p0: T!, /*1*/ p1: T!): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt b/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt index fb6394e17b0..7b160b2000d 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt @@ -10,12 +10,12 @@ public interface SamSubinterfaceOfTwo { public abstract fun f(): kotlin.CharSequence! } - public interface Super2 { + public interface Super2 { public abstract fun f(): T! } // Static members public final /*synthesized*/ fun Sub(/*0*/ function: () -> kotlin.String!): test.SamSubinterfaceOfTwo.Sub public final /*synthesized*/ fun Super1(/*0*/ function: () -> kotlin.CharSequence!): test.SamSubinterfaceOfTwo.Super1 - public final /*synthesized*/ fun Super2(/*0*/ function: () -> T!): test.SamSubinterfaceOfTwo.Super2 + public final /*synthesized*/ fun Super2(/*0*/ function: () -> T!): test.SamSubinterfaceOfTwo.Super2 } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt index 41b399cb364..dd1c56efbf7 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt @@ -1,7 +1,7 @@ package test -public open class TypeParameterOfClass { - public constructor TypeParameterOfClass() +public open class TypeParameterOfClass { + public constructor TypeParameterOfClass() public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit public open fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt index a82d094f377..bdf375312e0 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt @@ -4,8 +4,8 @@ public open class TypeParameterOfMethod { public constructor TypeParameterOfMethod() // Static members - public final /*synthesized*/ fun max(/*0*/ p0: ((T!, T!) -> kotlin.Int)!, /*1*/ p1: T!, /*2*/ p2: T!): T! - public open fun max(/*0*/ p0: java.util.Comparator!, /*1*/ p1: T!, /*2*/ p2: T!): T! + public final /*synthesized*/ fun max(/*0*/ p0: ((T!, T!) -> kotlin.Int)!, /*1*/ p1: T!, /*2*/ p2: T!): T! + public open fun max(/*0*/ p0: java.util.Comparator!, /*1*/ p1: T!, /*2*/ p2: T!): T! public final /*synthesized*/ fun max2(/*0*/ p0: ((T!, T!) -> kotlin.Int)!, /*1*/ p1: T!, /*2*/ p2: T!): T! public open fun max2(/*0*/ p0: java.util.Comparator!, /*1*/ p1: T!, /*2*/ p2: T!): T! public final /*synthesized*/ fun !> method(/*0*/ p0: ((A!, A!) -> kotlin.Int)!, /*1*/ p1: B!): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt index 2cc5708f804..2f702a2eeb8 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt @@ -1,7 +1,7 @@ package test -public open class TypeParameterOfOuterClass { - public constructor TypeParameterOfOuterClass() +public open class TypeParameterOfOuterClass { + public constructor TypeParameterOfOuterClass() public open inner class Inner { public constructor Inner() diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt index e57b8a18821..9a6ce66d599 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt @@ -12,7 +12,7 @@ public interface InheritedSameAdaptersWithSubstitution { public abstract fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } - public interface Super2 { + public interface Super2 { public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit public abstract fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } @@ -25,6 +25,6 @@ public interface InheritedSameAdaptersWithSubstitution { // Static members public final /*synthesized*/ fun Sub(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Sub public final /*synthesized*/ fun Super1(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super1 - public final /*synthesized*/ fun Super2(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2 + public final /*synthesized*/ fun Super2(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2 public final /*synthesized*/ fun Super2Substituted(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2Substituted } diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt index 891dc84c442..5a00f92277b 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.txt @@ -2,7 +2,7 @@ package test public interface ArraysInSubtypes { - public interface Sub : test.ArraysInSubtypes.Super { + public interface Sub : test.ArraysInSubtypes.Super { public abstract override /*1*/ fun array(): kotlin.Array<(out) kotlin.String!>! public abstract override /*1*/ fun listOfArray(): (kotlin.MutableList!>..kotlin.List!>?) public abstract override /*1*/ fun objArray(): kotlin.Array<(out) T!>! diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt index 4026ffe1b57..57b8b773ec9 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.txt @@ -2,7 +2,7 @@ package test public interface MethodTypeParameterErased { - public interface Bug { + public interface Bug { public abstract fun !> save(): RET! } diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt index 302b5090c63..03ea4b67048 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.txt @@ -3,13 +3,13 @@ package test public open class RawSuperType { public constructor RawSuperType() - public open inner class Derived : test.RawSuperType.Super { + public open inner class Derived : test.RawSuperType.Super { public constructor Derived() public open override /*1*/ fun dummy(): kotlin.Unit - public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any?): kotlin.Unit + public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any!): kotlin.Unit } - public interface Super { + public interface Super { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ p0: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.txt index b6d22fba192..e1ed1f006b3 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.txt @@ -3,14 +3,14 @@ package test public open class RawSuperTypeWithRecursiveBoundMultipleParameters { public constructor RawSuperTypeWithRecursiveBoundMultipleParameters() - public open inner class Derived : test.RawSuperTypeWithRecursiveBoundMultipleParameters.Super!> { + public open inner class Derived : test.RawSuperTypeWithRecursiveBoundMultipleParameters.Super!> { public constructor Derived() public open override /*1*/ fun dummy(): kotlin.Unit public open fun foo(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Unit - public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any?, /*1*/ p1: test.RawSuperTypeWithRecursiveBoundMultipleParameters.Super<*, *>!): kotlin.Unit + public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any!, /*1*/ p1: test.RawSuperTypeWithRecursiveBoundMultipleParameters.Super<*, *>!): kotlin.Unit } - public interface Super!> { + public interface Super!> { public abstract fun dummy(): kotlin.Unit public abstract fun foo(/*0*/ p0: R!, /*1*/ p1: T!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt index 1b71b6bddc0..3aff37ed373 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.txt @@ -2,8 +2,8 @@ package test public interface ReturnInnerSubclassOfSupersInner { - public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { - public constructor Sub() + public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { + public constructor Sub() public/*package*/ open inner class Inner : test.ReturnInnerSubclassOfSupersInner.Super.Inner { public/*package*/ constructor Inner() @@ -11,8 +11,8 @@ public interface ReturnInnerSubclassOfSupersInner { } } - public open class Super { - public constructor Super() + public open class Super { + public constructor Super() public/*package*/ open inner class Inner { public/*package*/ constructor Inner() diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt index 18cd766a66d..ec817ce64d8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt @@ -28,5 +28,5 @@ public open class ModalityOfFakeOverrides : java.util.AbstractList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! } diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt index 7b862069cee..5e561473717 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt @@ -39,7 +39,7 @@ internal final class C : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt index d2b6a1ba643..4bf0e71b68d 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt @@ -39,7 +39,7 @@ internal final class C : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit } diff --git a/compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.txt b/compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.txt index 2af89a91700..f68786d6666 100644 --- a/compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.txt +++ b/compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.txt @@ -1,5 +1,5 @@ package test -public open class ClassExtendsTypeParameter : T { - public constructor ClassExtendsTypeParameter() +public open class ClassExtendsTypeParameter : T { + public constructor ClassExtendsTypeParameter() } diff --git a/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt b/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt index 1b71b6bddc0..3aff37ed373 100644 --- a/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt +++ b/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt @@ -2,8 +2,8 @@ package test public interface ReturnInnerSubclassOfSupersInner { - public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { - public constructor Sub() + public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { + public constructor Sub() public/*package*/ open inner class Inner : test.ReturnInnerSubclassOfSupersInner.Super.Inner { public/*package*/ constructor Inner() @@ -11,8 +11,8 @@ public interface ReturnInnerSubclassOfSupersInner { } } - public open class Super { - public constructor Super() + public open class Super { + public constructor Super() public/*package*/ open inner class Inner { public/*package*/ constructor Inner() diff --git a/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt b/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt index 61dc85446eb..8b08ddee8e2 100644 --- a/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt +++ b/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt @@ -11,7 +11,7 @@ public interface ReturnNotSubtype { public abstract override /*1*/ fun t(): java.lang.Void! } - public interface Super { + public interface Super { public abstract fun _void(): kotlin.Unit public abstract fun array(): kotlin.Array<(out) T!>! public abstract fun klass(): java.lang.Class! diff --git a/compiler/testData/loadJava/sourceJava/TypeAnnotations.txt b/compiler/testData/loadJava/sourceJava/TypeAnnotations.txt index 8021ab11fcc..57a88e76dd9 100644 --- a/compiler/testData/loadJava/sourceJava/TypeAnnotations.txt +++ b/compiler/testData/loadJava/sourceJava/TypeAnnotations.txt @@ -1,6 +1,6 @@ package test -public interface TypeAnnotations { +public interface TypeAnnotations { public abstract fun f(/*0*/ p: test.G2<@[test.A()] kotlin.String!, @[test.A()] kotlin.Int!>!): kotlin.Unit public abstract fun f(/*0*/ p: test.G<@[test.A()] kotlin.String!>!): kotlin.Unit } diff --git a/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt b/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt index 0224c07a3aa..eeda4a9bcbf 100644 --- a/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt +++ b/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt @@ -6,10 +6,10 @@ public interface WrongNumberOfGenericParameters { public abstract fun t1(): test.WrongNumberOfGenericParameters.Two<*, *>! public abstract fun z(): test.WrongNumberOfGenericParameters.Zero! - public interface One { + public interface One { } - public interface Two { + public interface Two { } public interface Zero { diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java index 649dfdeb967..77b719cee76 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java @@ -10035,6 +10035,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("methodTypeParameterDefaultBound.kt") + public void testMethodTypeParameterDefaultBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt"); + doTest(fileName); + } + @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullableTypeArgument.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java index 15df05dcafd..12336ebc0b2 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java @@ -47,6 +47,12 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic doTest(fileName); } + @TestMetadata("overrideWithFunctionalType.kt") + public void testOverrideWithFunctionalType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt"); + doTest(fileName); + } + @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor.kt index 9c90a12c3a0..62add3013c7 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor.kt @@ -22,10 +22,13 @@ import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.JetType import org.jetbrains.kotlin.load.java.structure.JavaTypeParameter import org.jetbrains.kotlin.builtins.KotlinBuiltIns +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.load.java.components.TypeUsage import org.jetbrains.kotlin.load.java.lazy.LazyJavaResolverContext import org.jetbrains.kotlin.load.java.lazy.types.toAttributes import org.jetbrains.kotlin.descriptors.SourceElement +import org.jetbrains.kotlin.load.java.lazy.types.LazyJavaTypeResolver +import org.jetbrains.kotlin.load.java.lazy.types.toFlexible class LazyJavaTypeParameterDescriptor( private val c: LazyJavaResolverContext, @@ -45,7 +48,10 @@ class LazyJavaTypeParameterDescriptor( override fun resolveUpperBounds(): Set { val bounds = javaTypeParameter.getUpperBounds() if (bounds.isEmpty()) { - return setOf(c.module.builtIns.getDefaultBound()) + return setOf(LazyJavaTypeResolver.FlexibleJavaClassifierTypeCapabilities.create( + c.module.builtIns.getAnyType(), + c.module.builtIns.getNullableAnyType() + )) } else { return bounds.map { diff --git a/core/descriptors/src/org/jetbrains/kotlin/builtins/KotlinBuiltIns.java b/core/descriptors/src/org/jetbrains/kotlin/builtins/KotlinBuiltIns.java index 5b519332cdd..434ec5375b0 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/builtins/KotlinBuiltIns.java +++ b/core/descriptors/src/org/jetbrains/kotlin/builtins/KotlinBuiltIns.java @@ -923,6 +923,10 @@ public class KotlinBuiltIns { return isAnyOrNullableAny(type) && type.isMarkedNullable(); } + public static boolean isDefaultBound(@NotNull JetType type) { + return isNullableAny(type); + } + public static boolean isUnit(@NotNull JetType type) { return isNotNullConstructedFromGivenClass(type, FQ_NAMES.unit); } diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt index d8a20bd174d..da08f89bdd2 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt @@ -38,6 +38,7 @@ import org.jetbrains.kotlin.types.checker.JetTypeChecker import org.jetbrains.kotlin.types.checker.TypeCheckingProcedure import org.jetbrains.kotlin.types.checker.TypeCheckingProcedureCallbacks import org.jetbrains.kotlin.types.typeUtil.getNestedArguments +import org.jetbrains.kotlin.types.typeUtil.isDefaultBound import java.util.ArrayList import java.util.HashMap import java.util.HashSet @@ -151,7 +152,7 @@ public class ConstraintSystemImpl : ConstraintSystem { } for ((typeVariable, typeBounds) in allTypeParameterBounds) { for (declaredUpperBound in typeVariable.getUpperBounds()) { - if (KotlinBuiltIns.isNullableAny(declaredUpperBound)) continue //todo remove this line (?) + if (declaredUpperBound.isDefaultBound()) continue //todo remove this line (?) val position = TYPE_BOUND_POSITION.position(typeVariable.getIndex()) addBound(typeVariable, declaredUpperBound, UPPER_BOUND, position) } @@ -403,7 +404,7 @@ public class ConstraintSystemImpl : ConstraintSystem { constraintPosition: ConstraintPosition ) { val typeVariable = getMyTypeVariable(parameterType)!! - if (!KotlinBuiltIns.isNullableAny(typeVariable.getUpperBoundsAsType()) + if (!typeVariable.getUpperBoundsAsType().isDefaultBound() && constrainingTypeProjection.getProjectionKind() == Variance.IN_VARIANCE) { errors.add(CannotCapture(constraintPosition, typeVariable)) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt index 64f76e5d310..92ff89712d3 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt @@ -126,4 +126,6 @@ fun JetType.getNestedArguments(): List { typeProjection.getType().getArguments().forEach { stack.add(it) } } return result -} \ No newline at end of file +} + +public fun JetType.isDefaultBound(): Boolean = KotlinBuiltIns.isDefaultBound(getSupertypeRepresentative()) diff --git a/j2k/testData/fileOrElement/class/kt-639.kt b/j2k/testData/fileOrElement/class/kt-639.kt index b3be9543e98..be66bbb2d5a 100644 --- a/j2k/testData/fileOrElement/class/kt-639.kt +++ b/j2k/testData/fileOrElement/class/kt-639.kt @@ -1,5 +1,5 @@ -// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap(p0: kotlin.Int) Please specify it explicitly. -// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap(p0: kotlin.Int) Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap(p0: kotlin.Int) Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap(p0: kotlin.Int) Please specify it explicitly. package demo import java.util.HashMap diff --git a/j2k/testData/fileOrElement/classExpression/complexExample.kt b/j2k/testData/fileOrElement/classExpression/complexExample.kt index 86d980b020c..f0f3467ab8a 100644 --- a/j2k/testData/fileOrElement/classExpression/complexExample.kt +++ b/j2k/testData/fileOrElement/classExpression/complexExample.kt @@ -1 +1 @@ -val constrArgTypes = arrayOf>(javaClass>(), javaClass()) \ No newline at end of file +val constrArgTypes = arrayOf(javaClass>(), javaClass()) \ No newline at end of file diff --git a/j2k/testData/fileOrElement/issues/kt-1048.kt b/j2k/testData/fileOrElement/issues/kt-1048.kt index 574347082d5..62fa00f085e 100644 --- a/j2k/testData/fileOrElement/issues/kt-1048.kt +++ b/j2k/testData/fileOrElement/issues/kt-1048.kt @@ -1,5 +1,5 @@ -// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. -// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. import java.util.HashMap class G(t: T) diff --git a/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.kt b/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.kt index 1eed801b296..ba6f2d51a8b 100644 --- a/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.kt +++ b/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.kt @@ -1,4 +1,4 @@ -// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. package test class User { diff --git a/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.kt b/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.kt index 1eed801b296..ba6f2d51a8b 100644 --- a/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.kt +++ b/j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.kt @@ -1,4 +1,4 @@ -// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. package test class User { diff --git a/j2k/testData/fileOrElement/rawGenerics/kt-540-map.kt b/j2k/testData/fileOrElement/rawGenerics/kt-540-map.kt index cf0a603cd76..18c313ffc97 100644 --- a/j2k/testData/fileOrElement/rawGenerics/kt-540-map.kt +++ b/j2k/testData/fileOrElement/rawGenerics/kt-540-map.kt @@ -1,4 +1,4 @@ -// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap() Please specify it explicitly. package demo import java.util.HashMap diff --git a/j2k/testData/fileOrElement/rawGenerics/kt-540.kt b/j2k/testData/fileOrElement/rawGenerics/kt-540.kt index 0eda746845c..a0c4011f8fc 100644 --- a/j2k/testData/fileOrElement/rawGenerics/kt-540.kt +++ b/j2k/testData/fileOrElement/rawGenerics/kt-540.kt @@ -1,4 +1,4 @@ -// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. +// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList() Please specify it explicitly. package demo import java.util.ArrayList