diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/SignaturesPropagationData.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/SignaturesPropagationData.java index 238e5343ed5..b9dc9840be8 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/SignaturesPropagationData.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/SignaturesPropagationData.java @@ -35,7 +35,6 @@ import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe; import org.jetbrains.jet.lang.resolve.scopes.JetScope; import org.jetbrains.jet.lang.types.*; -import org.jetbrains.jet.lang.types.checker.TypeCheckingProcedure; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; import java.util.*; @@ -88,7 +87,7 @@ public class SignaturesPropagationData { public List getSuperFunctions() { return superFunctions; } - + private void reportError(String error) { signatureErrors.add(error); } @@ -96,15 +95,15 @@ public class SignaturesPropagationData { private JetType modifyReturnTypeAccordingToSuperMethods( @NotNull JetType autoType // type built by JavaTypeTransformer ) { - List typesFromSuperMethods = ContainerUtil.map(superFunctions, - new Function() { - @Override - public JetType fun(FunctionDescriptor superFunction) { - return superFunction.getReturnType(); - } - }); + List typesFromSuperMethods = ContainerUtil.map(superFunctions, + new Function() { + @Override + public TypeAndVariance fun(FunctionDescriptor superFunction) { + return new TypeAndVariance(superFunction.getReturnType(), Variance.OUT_VARIANCE); + } + }); - return modifyTypeAccordingToSuperMethods(autoType, typesFromSuperMethods, true); + return modifyTypeAccordingToSuperMethods(autoType, typesFromSuperMethods); } private List modifyTypeParametersAccordingToSuperMethods(List autoTypeParameters) { @@ -120,14 +119,14 @@ public class SignaturesPropagationData { } for (JetType autoUpperBound : autoParameter.getUpperBounds()) { - List upperBoundsFromSuperFunctions = Lists.newArrayList(); + List upperBoundsFromSuperFunctions = Lists.newArrayList(); for (Iterator iterator : upperBoundFromSuperFunctionsIterators) { assert iterator.hasNext(); - upperBoundsFromSuperFunctions.add(iterator.next()); + upperBoundsFromSuperFunctions.add(new TypeAndVariance(iterator.next(), Variance.INVARIANT)); } - JetType modifiedUpperBound = modifyTypeAccordingToSuperMethods(autoUpperBound, upperBoundsFromSuperFunctions, false); + JetType modifiedUpperBound = modifyTypeAccordingToSuperMethods(autoUpperBound, upperBoundsFromSuperFunctions); modifiedTypeParameter.addUpperBound(modifiedUpperBound); } @@ -152,18 +151,18 @@ public class SignaturesPropagationData { for (final ValueParameterDescriptor originalParam : parameters.getDescriptors()) { final int index = originalParam.getIndex(); - List typesFromSuperMethods = ContainerUtil.map(superFunctions, - new Function() { + List typesFromSuperMethods = ContainerUtil.map(superFunctions, + new Function() { @Override - public JetType fun(FunctionDescriptor superFunction) { - return superFunction.getValueParameters().get(index).getType(); + public TypeAndVariance fun(FunctionDescriptor superFunction) { + return new TypeAndVariance(superFunction.getValueParameters().get(index).getType(), Variance.INVARIANT); } }); VarargCheckResult varargCheckResult = checkVarargInSuperFunctions(originalParam); - JetType altType = modifyTypeAccordingToSuperMethods(varargCheckResult.parameterType, typesFromSuperMethods, false); + JetType altType = modifyTypeAccordingToSuperMethods(varargCheckResult.parameterType, typesFromSuperMethods); resultParameters.add(new ValueParameterDescriptorImpl( originalParam.getContainingDeclaration(), @@ -274,15 +273,14 @@ public class SignaturesPropagationData { @NotNull private JetType modifyTypeAccordingToSuperMethods( @NotNull JetType autoType, - @NotNull List typesFromSuper, - boolean covariantPosition + @NotNull List typesFromSuper ) { if (ErrorUtils.isErrorType(autoType)) { return autoType; } - boolean resultNullable = typeMustBeNullable(autoType, typesFromSuper, covariantPosition); - ClassifierDescriptor resultClassifier = modifyTypeClassifier(autoType, typesFromSuper, covariantPosition); + boolean resultNullable = typeMustBeNullable(autoType, typesFromSuper); + ClassifierDescriptor resultClassifier = modifyTypeClassifier(autoType, typesFromSuper); List resultArguments = getTypeArgsOfType(autoType, resultClassifier, typesFromSuper); JetScope resultScope; if (resultClassifier instanceof ClassDescriptor) { @@ -303,7 +301,7 @@ public class SignaturesPropagationData { private List getTypeArgsOfType( @NotNull JetType autoType, @NotNull ClassifierDescriptor classifier, - @NotNull List typesFromSuper + @NotNull List typesFromSuper ) { List autoArguments = autoType.getArguments(); @@ -313,22 +311,18 @@ public class SignaturesPropagationData { return autoArguments; } - List> typeArgumentsFromSuper = calculateTypeArgumentsFromSuper((ClassDescriptor) classifier, typesFromSuper); + List> typeArgumentsFromSuper = calculateTypeArgumentsFromSuper((ClassDescriptor) classifier, typesFromSuper); // Modify type arguments using info from typesFromSuper List resultArguments = Lists.newArrayList(); for (TypeParameterDescriptor parameter : classifier.getTypeConstructor().getParameters()) { TypeProjection argument = autoArguments.get(parameter.getIndex()); - TypeCheckingProcedure.EnrichedProjectionKind effectiveProjectionKind = - TypeCheckingProcedure.getEffectiveProjectionKind(parameter, argument); - JetType argumentType = argument.getType(); - List projectionsFromSuper = typeArgumentsFromSuper.get(parameter.getIndex()); - List argTypesFromSuper = getTypes(projectionsFromSuper); - boolean covariantPosition = effectiveProjectionKind == TypeCheckingProcedure.EnrichedProjectionKind.OUT; + List projectionsFromSuper = typeArgumentsFromSuper.get(parameter.getIndex()); + List argTypesFromSuper = getTypes(projectionsFromSuper); - JetType type = modifyTypeAccordingToSuperMethods(argumentType, argTypesFromSuper, covariantPosition); + JetType type = modifyTypeAccordingToSuperMethods(argumentType, argTypesFromSuper); Variance projectionKind = calculateArgumentProjectionKindFromSuper(argument, projectionsFromSuper); resultArguments.add(new TypeProjection(projectionKind, type)); @@ -338,11 +332,11 @@ public class SignaturesPropagationData { private Variance calculateArgumentProjectionKindFromSuper( @NotNull TypeProjection argument, - @NotNull List projectionsFromSuper + @NotNull List projectionsFromSuper ) { Set projectionKindsInSuper = Sets.newLinkedHashSet(); - for (TypeProjection projection : projectionsFromSuper) { - projectionKindsInSuper.add(projection.getProjectionKind()); + for (TypeProjectionAndVariance projectionAndVariance : projectionsFromSuper) { + projectionKindsInSuper.add(projectionAndVariance.typeProjection.getProjectionKind()); } Variance defaultProjectionKind = argument.getProjectionKind(); @@ -367,10 +361,10 @@ public class SignaturesPropagationData { } @NotNull - private static List getTypes(@NotNull List projections) { - List types = Lists.newArrayList(); - for (TypeProjection projection : projections) { - types.add(projection.getType()); + private static List getTypes(@NotNull List projections) { + List types = Lists.newArrayList(); + for (TypeProjectionAndVariance projection : projections) { + types.add(new TypeAndVariance(projection.typeProjection.getType(), projection.varianceOfParameter)); } return types; } @@ -380,9 +374,9 @@ public class SignaturesPropagationData { // - Foo is a subtype of Bar>, Baz // - input: klass = Foo, typesFromSuper = [Bar>, Baz] // - output[0] = [String, CharSequence], output[1] = [] - private static List> calculateTypeArgumentsFromSuper( + private static List> calculateTypeArgumentsFromSuper( @NotNull ClassDescriptor klass, - @NotNull Collection typesFromSuper + @NotNull Collection typesFromSuper ) { // For each superclass of klass and its parameters, hold their mapping to klass' parameters // #0 of Bar -> A @@ -395,15 +389,15 @@ public class SignaturesPropagationData { TypeUtils.makeUnsubstitutedType(klass, JetScope.EMPTY)); // for each parameter of klass, hold arguments in corresponding supertypes - List> parameterToArgumentsFromSuper = Lists.newArrayList(); + List> parameterToArgumentsFromSuper = Lists.newArrayList(); for (TypeParameterDescriptor ignored : klass.getTypeConstructor().getParameters()) { - parameterToArgumentsFromSuper.add(new ArrayList()); + parameterToArgumentsFromSuper.add(new ArrayList()); } // Enumerate all types from super and all its parameters - for (JetType typeFromSuper : typesFromSuper) { - for (TypeParameterDescriptor parameter : typeFromSuper.getConstructor().getParameters()) { - TypeProjection argument = typeFromSuper.getArguments().get(parameter.getIndex()); + for (TypeAndVariance typeFromSuper : typesFromSuper) { + for (TypeParameterDescriptor parameter : typeFromSuper.type.getConstructor().getParameters()) { + TypeProjection argument = typeFromSuper.type.getArguments().get(parameter.getIndex()); // for given example, this block is executed four times: // 1. typeFromSuper = Bar>, parameter = "#0 of Bar", argument = String @@ -422,7 +416,7 @@ public class SignaturesPropagationData { // this condition is true for 1 and 4, false for 2 and 3 if (classifier instanceof TypeParameterDescriptor && classifier.getContainingDeclaration() == klass) { int parameterIndex = ((TypeParameterDescriptor) classifier).getIndex(); - parameterToArgumentsFromSuper.get(parameterIndex).add(argument); + parameterToArgumentsFromSuper.get(parameterIndex).add(new TypeProjectionAndVariance(argument, parameter.getVariance())); } } } @@ -432,51 +426,42 @@ public class SignaturesPropagationData { private boolean typeMustBeNullable( @NotNull JetType autoType, - @NotNull List typesFromSuper, - boolean covariantPosition + @NotNull List typesFromSuper ) { - if (typesFromSuper.isEmpty()) { - return autoType.isNullable(); - } - - boolean someSupersNullable = false; + boolean someSupersNotCovariantNullable = false; boolean someSupersNotNull = false; - for (JetType typeFromSuper : typesFromSuper) { - if (typeFromSuper.isNullable()) { - someSupersNullable = true; + for (TypeAndVariance typeFromSuper : typesFromSuper) { + if (typeFromSuper.type.isNullable() && typeFromSuper.varianceOfParameter != Variance.OUT_VARIANCE) { + someSupersNotCovariantNullable = true; } - else { + else if (!typeFromSuper.type.isNullable()) { someSupersNotNull = true; } } - if (someSupersNotNull && someSupersNullable) { - //noinspection IfStatementWithIdenticalBranches - if (covariantPosition) { - return false; - } - else { + + if (someSupersNotCovariantNullable == someSupersNotNull) { + if (someSupersNotCovariantNullable) { reportError("Incompatible types in superclasses: " + typesFromSuper); } + return autoType.isNullable(); } - - assert someSupersNotNull || someSupersNullable; // we have at least one type, which is either not-null or nullable - - // This check may seem like voodoo magic, but it's not. - // We want to handle case when parameter of super method is nullable, but parameter of sub method claims to be not null: - // of course, it is an error in annotations, and parameter of sub method should be nullable. - if (!covariantPosition && someSupersNullable && !autoType.isNullable()) { - reportError("In superclass type is nullable: " + typesFromSuper + ", in subclass it is not: " + autoType); - return true; + else { + if (someSupersNotCovariantNullable) { + if (!autoType.isNullable()) { + reportError("In superclass type is nullable: " + typesFromSuper + ", in subclass it is not: " + autoType); + } + return true; + } + else { // someSupersNotNull is true here + return false; + } } - - return someSupersNullable && autoType.isNullable(); } @NotNull private ClassifierDescriptor modifyTypeClassifier( @NotNull JetType autoType, - @NotNull List typesFromSuper, - boolean covariantPosition + @NotNull List typesFromSuper ) { ClassifierDescriptor classifier = autoType.getConstructor().getDeclarationDescriptor(); if (!(classifier instanceof ClassDescriptor)) { @@ -487,14 +472,15 @@ public class SignaturesPropagationData { } return classifier; } - ClassDescriptor clazz = (ClassDescriptor) classifier; + ClassDescriptor klass = (ClassDescriptor) classifier; CollectionClassMapping collectionMapping = CollectionClassMapping.getInstance(); boolean someSupersMutable = false; - boolean someSupersReadOnly = false; - for (JetType typeFromSuper : typesFromSuper) { - ClassifierDescriptor classifierFromSuper = typeFromSuper.getConstructor().getDeclarationDescriptor(); + boolean someSupersCovariantReadOnly = false; + boolean someSupersNotCovariantReadOnly = false; + for (TypeAndVariance typeFromSuper : typesFromSuper) { + ClassifierDescriptor classifierFromSuper = typeFromSuper.type.getConstructor().getDeclarationDescriptor(); if (classifierFromSuper instanceof ClassDescriptor) { ClassDescriptor classFromSuper = (ClassDescriptor) classifierFromSuper; @@ -502,35 +488,31 @@ public class SignaturesPropagationData { someSupersMutable = true; } else if (collectionMapping.isReadOnlyCollection(classFromSuper)) { - someSupersReadOnly = true; + if (typeFromSuper.varianceOfParameter == Variance.OUT_VARIANCE) { + someSupersCovariantReadOnly = true; + } + else { + someSupersNotCovariantReadOnly = true; + } } } } - if (covariantPosition) { - if (collectionMapping.isMutableCollection(clazz)) { - if (someSupersReadOnly && !someSupersMutable) { - return collectionMapping.convertMutableToReadOnly(clazz); - } + if (someSupersMutable && someSupersNotCovariantReadOnly) { + reportError("Incompatible types in superclasses: " + typesFromSuper); + return classifier; + } + else if (someSupersMutable) { + if (collectionMapping.isReadOnlyCollection(klass)) { + return collectionMapping.convertReadOnlyToMutable(klass); } } - else { - if (someSupersMutable == someSupersReadOnly) { - //noinspection ConstantConditions - if (someSupersMutable && someSupersReadOnly) { - reportError("Incompatible types in superclasses: " + typesFromSuper); - } - return classifier; - } - - if (someSupersMutable && collectionMapping.isReadOnlyCollection(clazz)) { - return collectionMapping.convertReadOnlyToMutable(clazz); - } - - if (someSupersReadOnly && collectionMapping.isMutableCollection(clazz)) { - return collectionMapping.convertMutableToReadOnly(clazz); + else if (someSupersNotCovariantReadOnly || someSupersCovariantReadOnly) { + if (collectionMapping.isMutableCollection(klass)) { + return collectionMapping.convertMutableToReadOnly(klass); } } + return classifier; } @@ -543,9 +525,37 @@ public class SignaturesPropagationData { public final JetType parameterType; public final boolean isVararg; - private VarargCheckResult(JetType parameterType, boolean isVararg) { + public VarargCheckResult(JetType parameterType, boolean isVararg) { this.parameterType = parameterType; this.isVararg = isVararg; } } + + private static class TypeProjectionAndVariance { + public final TypeProjection typeProjection; + public final Variance varianceOfParameter; + + public TypeProjectionAndVariance(TypeProjection typeProjection, Variance varianceOfParameter) { + this.typeProjection = typeProjection; + this.varianceOfParameter = varianceOfParameter; + } + + public String toString() { + return typeProjection.toString(); + } + } + + private static class TypeAndVariance { + public final JetType type; + public final Variance varianceOfParameter; + + public TypeAndVariance(JetType type, Variance varianceOfParameter) { + this.type = type; + this.varianceOfParameter = varianceOfParameter; + } + + public String toString() { + return type.toString(); + } + } } diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java new file mode 100644 index 00000000000..ceefd42efe2 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java @@ -0,0 +1,22 @@ +package test; + +import org.jetbrains.annotations.NotNull; +import jet.runtime.typeinfo.KotlinSignature; +import java.util.*; + +public interface TwoSuperclassesInvariantAndCovariantInferMutability { + + public interface Super1 { + @KotlinSignature("fun foo(): List>") + public List> foo(); + } + + public interface Super2 { + @KotlinSignature("fun foo(): MutableList>") + public List> foo(); + } + + public interface Sub extends Super1, Super2 { + public List> foo(); + } +} diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt new file mode 100644 index 00000000000..814af6afd2a --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt @@ -0,0 +1,16 @@ +package test + +public trait TwoSuperclassesInvariantAndCovariantInferMutability: Object { + + public trait Super1: Object { + public fun foo(): List> + } + + public trait Super2: Object { + public fun foo(): MutableList> + } + + public trait Sub: Super1, Super2 { + override fun foo(): MutableList> + } +} diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.txt new file mode 100644 index 00000000000..126636b1400 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.txt @@ -0,0 +1,13 @@ +namespace test + +public abstract trait test.TwoSuperclassesInvariantAndCovariantInferMutability : java.lang.Object { + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferMutability.Sub : test.TwoSuperclassesInvariantAndCovariantInferMutability.Super1, test.TwoSuperclassesInvariantAndCovariantInferMutability.Super2 { + public abstract override /*2*/ fun foo(): jet.MutableList> + } + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferMutability.Super1 : java.lang.Object { + public abstract fun foo(): jet.List> + } + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferMutability.Super2 : java.lang.Object { + public abstract fun foo(): jet.MutableList> + } +} diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java new file mode 100644 index 00000000000..654892b3345 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java @@ -0,0 +1,22 @@ +package test; + +import org.jetbrains.annotations.NotNull; +import jet.runtime.typeinfo.KotlinSignature; +import java.util.*; + +public interface TwoSuperclassesInvariantAndCovariantInferNullability { + + public interface Super1 { + @KotlinSignature("fun foo(): List") + public List foo(); + } + + public interface Super2 { + @KotlinSignature("fun foo(): MutableList") + public List foo(); + } + + public interface Sub extends Super1, Super2 { + public List foo(); + } +} diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt new file mode 100644 index 00000000000..87135f5feeb --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt @@ -0,0 +1,16 @@ +package test + +public trait TwoSuperclassesInvariantAndCovariantInferNullability: Object { + + public trait Super1: Object { + public fun foo(): List + } + + public trait Super2: Object { + public fun foo(): MutableList + } + + public trait Sub: Super1, Super2 { + override fun foo(): MutableList + } +} diff --git a/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.txt b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.txt new file mode 100644 index 00000000000..bdea1c7622e --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.txt @@ -0,0 +1,13 @@ +namespace test + +public abstract trait test.TwoSuperclassesInvariantAndCovariantInferNullability : java.lang.Object { + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferNullability.Sub : test.TwoSuperclassesInvariantAndCovariantInferNullability.Super1, test.TwoSuperclassesInvariantAndCovariantInferNullability.Super2 { + public abstract override /*2*/ fun foo(): jet.MutableList + } + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferNullability.Super1 : java.lang.Object { + public abstract fun foo(): jet.List + } + public abstract trait test.TwoSuperclassesInvariantAndCovariantInferNullability.Super2 : java.lang.Object { + public abstract fun foo(): jet.MutableList + } +} diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java index cd3dd08bbb7..59a2c2a5dc0 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java @@ -664,6 +664,16 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { doTest("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); } + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") + public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") + public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); + } + @TestMetadata("TwoSuperclassesMutableAndNot.java") public void testTwoSuperclassesMutableAndNot() throws Exception { doTest("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java index 736054fa0d3..3602c8ae9ad 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java @@ -1554,6 +1554,16 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") + public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") + public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); + } + @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt");