[NI] CST: add preemptive recursion detection
For single super type constructor create star projection argument when types for that argument are equal to the original types. Captured star projections are replaced with their corresponding supertypes during this check. Skip check for `in` parameters, for which recursive cst calculation does not happen. Adjust constant in fallback recursion condition. ^KT-38544 Fixed
This commit is contained in:
+73
-5
@@ -10226,11 +10226,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("recursiveTypes.kt")
|
|
||||||
public void testRecursiveTypes() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
||||||
@@ -11269,6 +11264,79 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class RecursiveTypes extends AbstractFirOldFrontendDiagnosticsTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInRecursiveTypes() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("multirecursion.kt")
|
||||||
|
public void testMultirecursion() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInIn.kt")
|
||||||
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInInv.kt")
|
||||||
|
public void testRecursiveInInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInOut.kt")
|
||||||
|
public void testRecursiveInOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvIn.kt")
|
||||||
|
public void testRecursiveInvIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvOut.kt")
|
||||||
|
public void testRecursiveInvOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutIn.kt")
|
||||||
|
public void testRecursiveOutIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutInv.kt")
|
||||||
|
public void testRecursiveOutInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutOut.kt")
|
||||||
|
public void testRecursiveOutOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypeWithNonStarResult.kt")
|
||||||
|
public void testRecursiveTypeWithNonStarResult() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypeWithNonStarResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypes.kt")
|
||||||
|
public void testRecursiveTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("twoTypeConstructors.kt")
|
||||||
|
public void testTwoTypeConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/twoTypeConstructors.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+5
@@ -1931,6 +1931,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveFlexibleAssertions.kt")
|
||||||
|
public void testRecursiveFlexibleAssertions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+60
-2
@@ -237,11 +237,13 @@ object NewCommonSuperTypeCalculator {
|
|||||||
contextStubTypesEqualToAnything: AbstractTypeCheckerContext
|
contextStubTypesEqualToAnything: AbstractTypeCheckerContext
|
||||||
): List<TypeConstructorMarker> {
|
): List<TypeConstructorMarker> {
|
||||||
val result = collectAllSupertypes(types.first(), contextStubTypesEqualToAnything)
|
val result = collectAllSupertypes(types.first(), contextStubTypesEqualToAnything)
|
||||||
|
// retain all super constructors of the first type that are present in the supertypes of all other types
|
||||||
for (type in types) {
|
for (type in types) {
|
||||||
if (type === types.first()) continue
|
if (type === types.first()) continue
|
||||||
|
|
||||||
result.retainAll(collectAllSupertypes(type, contextStubTypesEqualToAnything))
|
result.retainAll(collectAllSupertypes(type, contextStubTypesEqualToAnything))
|
||||||
}
|
}
|
||||||
|
// remove all constructors that have subtype(s) with constructors from the resulting set - they are less precise
|
||||||
return result.filterNot { target ->
|
return result.filterNot { target ->
|
||||||
result.any { other ->
|
result.any { other ->
|
||||||
other != target && other.supertypes().any { it.typeConstructor() == target }
|
other != target && other.supertypes().any { it.typeConstructor() == target }
|
||||||
@@ -323,7 +325,7 @@ object NewCommonSuperTypeCalculator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val argument =
|
val argument =
|
||||||
if (thereIsStar || typeProjections.isEmpty()) {
|
if (thereIsStar || typeProjections.isEmpty() || checkRecursion(types, typeProjections, parameter)) {
|
||||||
createStarProjection(parameter)
|
createStarProjection(parameter)
|
||||||
} else {
|
} else {
|
||||||
collapseRecursiveArgumentIfPossible(calculateArgument(parameter, typeProjections, depth))
|
collapseRecursiveArgumentIfPossible(calculateArgument(parameter, typeProjections, depth))
|
||||||
@@ -341,13 +343,68 @@ object NewCommonSuperTypeCalculator {
|
|||||||
return capturedType.typeConstructor().projection()
|
return capturedType.typeConstructor().projection()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun TypeSystemCommonSuperTypesContext.checkRecursion(
|
||||||
|
originalTypesForCst: List<SimpleTypeMarker>,
|
||||||
|
typeArgumentsForSuperConstructorParameter: List<TypeArgumentMarker>,
|
||||||
|
parameter: TypeParameterMarker,
|
||||||
|
): Boolean {
|
||||||
|
if (parameter.getVariance() == TypeVariance.IN)
|
||||||
|
return false // arguments for contravariant parameters are intersected, recursion should not be possible
|
||||||
|
|
||||||
|
val originalTypesSet = originalTypesForCst.toSet()
|
||||||
|
val typeArgumentsTypeSet = typeArgumentsForSuperConstructorParameter.map { it.getType().lowerBoundIfFlexible() }.toSet()
|
||||||
|
|
||||||
|
if (originalTypesSet.size != typeArgumentsTypeSet.size)
|
||||||
|
return false
|
||||||
|
|
||||||
|
// only needed in case of captured star projections in argument types
|
||||||
|
val originalTypeConstructorSet by lazy { typeConstructorsWithExpandedStarProjections(originalTypesSet).toSet() }
|
||||||
|
|
||||||
|
for (argumentType in typeArgumentsTypeSet) {
|
||||||
|
if (argumentType in originalTypesSet) continue
|
||||||
|
|
||||||
|
var starProjectionFound = false
|
||||||
|
for (supertype in supertypesIfCapturedStarProjection(argumentType).orEmpty()) {
|
||||||
|
if (supertype.lowerBoundIfFlexible().typeConstructor() !in originalTypeConstructorSet)
|
||||||
|
return false
|
||||||
|
else starProjectionFound = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!starProjectionFound)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun TypeSystemCommonSuperTypesContext.typeConstructorsWithExpandedStarProjections(types: Set<SimpleTypeMarker>) = sequence {
|
||||||
|
for (type in types) {
|
||||||
|
if (isCapturedStarProjection(type)) {
|
||||||
|
for (supertype in supertypesIfCapturedStarProjection(type).orEmpty()) {
|
||||||
|
yield(supertype.lowerBoundIfFlexible().typeConstructor())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
yield(type.typeConstructor())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun TypeSystemCommonSuperTypesContext.isCapturedStarProjection(type: SimpleTypeMarker): Boolean =
|
||||||
|
type.asCapturedType()?.typeConstructor()?.projection()?.isStarProjection() == true
|
||||||
|
|
||||||
|
private fun TypeSystemCommonSuperTypesContext.supertypesIfCapturedStarProjection(type: SimpleTypeMarker): Collection<KotlinTypeMarker>? {
|
||||||
|
val constructor = type.asCapturedType()?.typeConstructor() ?: return null
|
||||||
|
return if (constructor.projection().isStarProjection())
|
||||||
|
constructor.supertypes()
|
||||||
|
else null
|
||||||
|
}
|
||||||
|
|
||||||
// no star projections in arguments
|
// no star projections in arguments
|
||||||
private fun TypeSystemCommonSuperTypesContext.calculateArgument(
|
private fun TypeSystemCommonSuperTypesContext.calculateArgument(
|
||||||
parameter: TypeParameterMarker,
|
parameter: TypeParameterMarker,
|
||||||
arguments: List<TypeArgumentMarker>,
|
arguments: List<TypeArgumentMarker>,
|
||||||
depth: Int
|
depth: Int
|
||||||
): TypeArgumentMarker {
|
): TypeArgumentMarker {
|
||||||
if (depth >= 0) {
|
if (depth > 0) {
|
||||||
return createStarProjection(parameter)
|
return createStarProjection(parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +434,7 @@ object NewCommonSuperTypeCalculator {
|
|||||||
|
|
||||||
// CS(Out<X>, Out<Y>) = Out<CS(X, Y)>
|
// CS(Out<X>, Out<Y>) = Out<CS(X, Y)>
|
||||||
// CS(In<X>, In<Y>) = In<X & Y>
|
// CS(In<X>, In<Y>) = In<X & Y>
|
||||||
|
// CS(Inv<X>, Inv<Y>) = Inv<out CS(X, Y)>)
|
||||||
if (asOut) {
|
if (asOut) {
|
||||||
val argumentTypes = arguments.map { it.getType() }
|
val argumentTypes = arguments.map { it.getType() }
|
||||||
val parameterIsNotInv = parameter.getVariance() != TypeVariance.INV
|
val parameterIsNotInv = parameter.getVariance() != TypeVariance.INV
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface I1<A : I1<A>>
|
||||||
|
interface I2<C : I2<C>>
|
||||||
|
|
||||||
|
interface I3<E: I3<E>> : I2<E>, I1<E>
|
||||||
|
interface I4<E: I4<E>> : I2<E>, I1<E>
|
||||||
|
|
||||||
|
class C1<F> : I3<C1<F>>
|
||||||
|
class C2 : I4<C2>
|
||||||
|
|
||||||
|
class Box<T>
|
||||||
|
|
||||||
|
fun test(c1: C1<Box<Box<Box<Int>>>>, c2: C2) {
|
||||||
|
val v = select(c1, c2)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("I2<*> & I1<*>")!>v<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface I1<A : I1<A>>
|
||||||
|
interface I2<C : I2<C>>
|
||||||
|
|
||||||
|
interface I3<E: I3<E>> : I2<E>, I1<E>
|
||||||
|
interface I4<E: I4<E>> : I2<E>, I1<E>
|
||||||
|
|
||||||
|
class C1<F> : I3<C1<F>>
|
||||||
|
class C2 : I4<C2>
|
||||||
|
|
||||||
|
class Box<T>
|
||||||
|
|
||||||
|
fun test(c1: C1<Box<Box<Box<Int>>>>, c2: C2) {
|
||||||
|
val v = select(c1, c2)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("{I1<*> & I2<*>}")!>v<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun test(/*0*/ c1: C1<Box<Box<Box<kotlin.Int>>>>, /*1*/ c2: C2): kotlin.Unit
|
||||||
|
|
||||||
|
public final class Box</*0*/ T> {
|
||||||
|
public constructor Box</*0*/ T>()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class C1</*0*/ F> : I3<C1<F>> {
|
||||||
|
public constructor C1</*0*/ F>()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class C2 : I4<C2> {
|
||||||
|
public constructor C2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I1</*0*/ A : I1<A>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2</*0*/ C : I2<C>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3</*0*/ E : I3<E>> : I2<E>, I1<E> {
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4</*0*/ E : I4<E>> : I2<E>, I1<E> {
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj3, I2 & I3>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj4, I2 & I4>")!>cst2<!>
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj3}, {I2 & I3}>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj4}, {I2 & I4}>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ in A : Rec<A, B>, /*1*/ in B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj3, out I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj4, out kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj3}, out I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj4}, out kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ in A : Rec<A, B>, /*1*/ B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, out B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj3, I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<Obj2 & Obj4, kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<in A: Rec<A, B>, out B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj3}, I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<{Obj2 & Obj4}, kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ in A : Rec<A, B>, /*1*/ out B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I2 & I3>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I2 & I4>")!>cst2<!>
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, {I2 & I3}>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, {I2 & I4}>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ A : Rec<A, B>, /*1*/ in B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
interface Rec<A: Rec<A, B>, out B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ A : Rec<A, B>, /*1*/ out B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<out A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I2 & I3>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I2 & I4>")!>cst2<!>
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
interface Rec<out A: Rec<A, B>, in B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, {I2 & I3}>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, {I2 & I4}>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ out A : Rec<A, B>, /*1*/ in B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
interface Rec<out A: Rec<A, B>, B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, out I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, out kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ out A : Rec<A, B>, /*1*/ B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
interface Rec<out A: Rec<A, B>, out B>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
interface I4
|
||||||
|
|
||||||
|
object Obj2 : Rec<Obj2, I2>
|
||||||
|
object Obj3 : Rec<Obj3, I3>
|
||||||
|
object Obj4 : Rec<Obj4, I4>
|
||||||
|
|
||||||
|
fun testOutOut() {
|
||||||
|
val cst1 = select(Obj2, Obj3)
|
||||||
|
val cst2 = select(Obj2, Obj4)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, I1>")!>cst1<!>
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*, kotlin.Any>")!>cst2<!>
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun testOutOut(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I4 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj2 : Rec<Obj2, I2> {
|
||||||
|
private constructor Obj2()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj3 : Rec<Obj3, I3> {
|
||||||
|
private constructor Obj3()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Obj4 : Rec<Obj4, I4> {
|
||||||
|
private constructor Obj4()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ out A : Rec<A, B>, /*1*/ out B> {
|
||||||
|
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
|
||||||
|
}
|
||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
interface A<T: A<T>>
|
||||||
|
interface C<T> : A<C<T>>
|
||||||
|
interface D<T> : A<C<T>>
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
fun test(c: C<String>, d: D<String>) {
|
||||||
|
val v = select(c, d)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("A<C<kotlin.String>>")!>v<!>
|
||||||
|
}
|
||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun test(/*0*/ c: C<kotlin.String>, /*1*/ d: D<kotlin.String>): kotlin.Unit
|
||||||
|
|
||||||
|
public interface A</*0*/ T : A<T>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface C</*0*/ T> : A<C<T>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface D</*0*/ T> : A<C<T>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
// !WITH_NEW_INFERENCE
|
|
||||||
|
|
||||||
interface RecursiveGeneric<T : RecursiveGeneric<T, U>, U>
|
interface RecursiveGeneric<T : RecursiveGeneric<T, U>, U>
|
||||||
|
|
||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
// !WITH_NEW_INFERENCE
|
|
||||||
|
|
||||||
interface RecursiveGeneric<T : RecursiveGeneric<T, U>, U>
|
interface RecursiveGeneric<T : RecursiveGeneric<T, U>, U>
|
||||||
|
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface Rec<T : Rec<T>>
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
|
||||||
|
object O1 : Rec<O1>, I2
|
||||||
|
object O2 : Rec<O2>, I3
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
val cst = select(O1, O2)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("Rec<*> & I1")!>cst<!>
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
fun <S> select(vararg args: S): S = TODO()
|
||||||
|
|
||||||
|
interface Rec<T : Rec<T>>
|
||||||
|
|
||||||
|
interface I1
|
||||||
|
interface I2 : I1
|
||||||
|
interface I3 : I1
|
||||||
|
|
||||||
|
object O1 : Rec<O1>, I2
|
||||||
|
object O2 : Rec<O2>, I3
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
val cst = select(O1, O2)
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("{I1 & Rec<*>}")!>cst<!>
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ S> select(/*0*/ vararg args: S /*kotlin.Array<out S>*/): S
|
||||||
|
public fun test(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I2 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3 : I1 {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public object O1 : Rec<O1>, I2 {
|
||||||
|
private constructor O1()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public object O2 : Rec<O2>, I3 {
|
||||||
|
private constructor O2()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Rec</*0*/ T : Rec<T>> {
|
||||||
|
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
|
||||||
|
}
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_EXPRESSION
|
||||||
|
// Issue: KT-35844
|
||||||
|
|
||||||
|
// ---------------------- AssertJ declarations --------------------------
|
||||||
|
// FILE: AbstractAssert.java
|
||||||
|
public abstract class AbstractAssert<SELF extends AbstractAssert<SELF, ACTUAL>, ACTUAL> {}
|
||||||
|
|
||||||
|
// FILE: EnumerableAssert.java
|
||||||
|
public interface EnumerableAssert<SELF extends EnumerableAssert<SELF, ELEMENT>, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: ObjectEnumerableAssert.java
|
||||||
|
public interface ObjectEnumerableAssert<SELF extends ObjectEnumerableAssert<SELF, ELEMENT>, ELEMENT>
|
||||||
|
extends EnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: IndexedObjectEnumerableAssert.java
|
||||||
|
public interface IndexedObjectEnumerableAssert<SELF extends IndexedObjectEnumerableAssert<SELF, ELEMENT>, ELEMENT>
|
||||||
|
extends ObjectEnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: AbstractIterableAssert.java
|
||||||
|
public abstract class AbstractIterableAssert<
|
||||||
|
SELF extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
|
||||||
|
ACTUAL extends Iterable<? extends ELEMENT>,
|
||||||
|
ELEMENT,
|
||||||
|
ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
|
||||||
|
extends AbstractAssert<SELF, ACTUAL> implements ObjectEnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: AbstractListAssert.java
|
||||||
|
public abstract class AbstractListAssert<
|
||||||
|
SELF extends AbstractListAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
|
||||||
|
ACTUAL extends List<? extends ELEMENT>,
|
||||||
|
ELEMENT,
|
||||||
|
ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
|
||||||
|
extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>
|
||||||
|
implements IndexedObjectEnumerableAssert<SELF, ELEMENT> {
|
||||||
|
SELF isNotEmpty() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: ListAssert.java
|
||||||
|
public class ListAssert<ELEMENT> extends AbstractListAssert<ListAssert<ELEMENT>, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> {}
|
||||||
|
|
||||||
|
// FILE: AbstractCharSequenceAssert.java
|
||||||
|
public abstract class AbstractCharSequenceAssert<SELF extends AbstractCharSequenceAssert<SELF, ACTUAL>, ACTUAL extends CharSequence>
|
||||||
|
extends AbstractAssert<SELF, ACTUAL> implements EnumerableAssert<SELF, Character> {}
|
||||||
|
|
||||||
|
// FILE: AbstractStringAssert.java
|
||||||
|
public class AbstractStringAssert<SELF extends AbstractStringAssert<SELF>> extends AbstractCharSequenceAssert<SELF, String> {
|
||||||
|
public SELF isEqualTo(String expected) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: StringAssert.java
|
||||||
|
public class StringAssert extends AbstractStringAssert<StringAssert> {}
|
||||||
|
|
||||||
|
// FILE: Assertions.java
|
||||||
|
public class Assertions {
|
||||||
|
public static <ELEMENT> ListAssert<ELEMENT> assertThat(java.util.List<? extends ELEMENT> actual) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AbstractStringAssert<?> assertThat(String actual) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ---------------------- AssertJ declarations end --------------------------
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
fun test() {
|
||||||
|
val assertion = when {
|
||||||
|
true -> Assertions.assertThat(listOf("foo")).isNotEmpty
|
||||||
|
else -> Assertions.assertThat("bar").isEqualTo("bar")
|
||||||
|
}
|
||||||
|
// TODO: FIR
|
||||||
|
// {AbstractAssert<*, out Any!>! & EnumerableAssert<*, {Comparable<*> & java.io.Serializable!}>!} with unfolded flexible nullability
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("AbstractAssert<out AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!> & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!>? & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>?, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!> & EnumerableAssert<out AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!> & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!>? & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>?, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>..AbstractAssert<out AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!> & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!>? & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>?, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!>? & EnumerableAssert<out AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!> & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: Unresolved: <error>..ERROR CLASS: Unresolved: <error>!>? & EnumerableAssert<*, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>?, out kotlin.Comparable<kotlin.String & kotlin.Char> & java.io.Serializable..kotlin.Comparable<kotlin.String & kotlin.Char>? & java.io.Serializable?>?")!>assertion<!>
|
||||||
|
}
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_EXPRESSION
|
||||||
|
// Issue: KT-35844
|
||||||
|
|
||||||
|
// ---------------------- AssertJ declarations --------------------------
|
||||||
|
// FILE: AbstractAssert.java
|
||||||
|
public abstract class AbstractAssert<SELF extends AbstractAssert<SELF, ACTUAL>, ACTUAL> {}
|
||||||
|
|
||||||
|
// FILE: EnumerableAssert.java
|
||||||
|
public interface EnumerableAssert<SELF extends EnumerableAssert<SELF, ELEMENT>, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: ObjectEnumerableAssert.java
|
||||||
|
public interface ObjectEnumerableAssert<SELF extends ObjectEnumerableAssert<SELF, ELEMENT>, ELEMENT>
|
||||||
|
extends EnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: IndexedObjectEnumerableAssert.java
|
||||||
|
public interface IndexedObjectEnumerableAssert<SELF extends IndexedObjectEnumerableAssert<SELF, ELEMENT>, ELEMENT>
|
||||||
|
extends ObjectEnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: AbstractIterableAssert.java
|
||||||
|
public abstract class AbstractIterableAssert<
|
||||||
|
SELF extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
|
||||||
|
ACTUAL extends Iterable<? extends ELEMENT>,
|
||||||
|
ELEMENT,
|
||||||
|
ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
|
||||||
|
extends AbstractAssert<SELF, ACTUAL> implements ObjectEnumerableAssert<SELF, ELEMENT> {}
|
||||||
|
|
||||||
|
// FILE: AbstractListAssert.java
|
||||||
|
public abstract class AbstractListAssert<
|
||||||
|
SELF extends AbstractListAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
|
||||||
|
ACTUAL extends List<? extends ELEMENT>,
|
||||||
|
ELEMENT,
|
||||||
|
ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
|
||||||
|
extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>
|
||||||
|
implements IndexedObjectEnumerableAssert<SELF, ELEMENT> {
|
||||||
|
SELF isNotEmpty() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: ListAssert.java
|
||||||
|
public class ListAssert<ELEMENT> extends AbstractListAssert<ListAssert<ELEMENT>, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> {}
|
||||||
|
|
||||||
|
// FILE: AbstractCharSequenceAssert.java
|
||||||
|
public abstract class AbstractCharSequenceAssert<SELF extends AbstractCharSequenceAssert<SELF, ACTUAL>, ACTUAL extends CharSequence>
|
||||||
|
extends AbstractAssert<SELF, ACTUAL> implements EnumerableAssert<SELF, Character> {}
|
||||||
|
|
||||||
|
// FILE: AbstractStringAssert.java
|
||||||
|
public class AbstractStringAssert<SELF extends AbstractStringAssert<SELF>> extends AbstractCharSequenceAssert<SELF, String> {
|
||||||
|
public SELF isEqualTo(String expected) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: StringAssert.java
|
||||||
|
public class StringAssert extends AbstractStringAssert<StringAssert> {}
|
||||||
|
|
||||||
|
// FILE: Assertions.java
|
||||||
|
public class Assertions {
|
||||||
|
public static <ELEMENT> ListAssert<ELEMENT> assertThat(java.util.List<? extends ELEMENT> actual) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AbstractStringAssert<?> assertThat(String actual) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ---------------------- AssertJ declarations end --------------------------
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
fun test() {
|
||||||
|
val assertion = when {
|
||||||
|
true -> Assertions.assertThat(listOf("foo")).isNotEmpty
|
||||||
|
else -> Assertions.assertThat("bar").isEqualTo("bar")
|
||||||
|
}
|
||||||
|
// TODO: FIR
|
||||||
|
// {AbstractAssert<*, out Any!>! & EnumerableAssert<*, {Comparable<*> & java.io.Serializable!}>!} with unfolded flexible nullability
|
||||||
|
<!DEBUG_INFO_EXPRESSION_TYPE("({AbstractAssert<*, out (kotlin.Any..kotlin.Any?)> & EnumerableAssert<*, out ({Comparable<*> & java.io.Serializable}..{Comparable<*>? & java.io.Serializable?})>}..{AbstractAssert<*, out (kotlin.Any..kotlin.Any?)>? & EnumerableAssert<*, out ({Comparable<*> & java.io.Serializable}..{Comparable<*>? & java.io.Serializable?})>?})")!>assertion<!>
|
||||||
|
}
|
||||||
+85
@@ -0,0 +1,85 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun test(): kotlin.Unit
|
||||||
|
|
||||||
|
public abstract class AbstractAssert</*0*/ SELF : AbstractAssert<SELF!, ACTUAL!>!, /*1*/ ACTUAL : kotlin.Any!> {
|
||||||
|
public constructor AbstractAssert</*0*/ SELF : AbstractAssert<SELF!, ACTUAL!>!, /*1*/ ACTUAL : kotlin.Any!>()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class AbstractCharSequenceAssert</*0*/ SELF : AbstractCharSequenceAssert<SELF!, ACTUAL!>!, /*1*/ ACTUAL : kotlin.CharSequence!> : AbstractAssert<SELF!, ACTUAL!>, EnumerableAssert<SELF!, kotlin.Char!> {
|
||||||
|
public constructor AbstractCharSequenceAssert</*0*/ SELF : AbstractCharSequenceAssert<SELF!, ACTUAL!>!, /*1*/ ACTUAL : kotlin.CharSequence!>()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class AbstractIterableAssert</*0*/ SELF : AbstractIterableAssert<SELF!, ACTUAL!, ELEMENT!, ELEMENT_ASSERT!>!, /*1*/ ACTUAL : kotlin.collections.(Mutable)Iterable<ELEMENT!>!, /*2*/ ELEMENT : kotlin.Any!, /*3*/ ELEMENT_ASSERT : AbstractAssert<ELEMENT_ASSERT!, ELEMENT!>!> : AbstractAssert<SELF!, ACTUAL!>, ObjectEnumerableAssert<SELF!, ELEMENT!> {
|
||||||
|
public constructor AbstractIterableAssert</*0*/ SELF : AbstractIterableAssert<SELF!, ACTUAL!, ELEMENT!, ELEMENT_ASSERT!>!, /*1*/ ACTUAL : kotlin.collections.(Mutable)Iterable<ELEMENT!>!, /*2*/ ELEMENT : kotlin.Any!, /*3*/ ELEMENT_ASSERT : AbstractAssert<ELEMENT_ASSERT!, ELEMENT!>!>()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class AbstractListAssert</*0*/ SELF : AbstractListAssert<SELF!, ACTUAL!, ELEMENT!, ELEMENT_ASSERT!>!, /*1*/ ACTUAL : List!, /*2*/ ELEMENT : kotlin.Any!, /*3*/ ELEMENT_ASSERT : AbstractAssert<ELEMENT_ASSERT!, ELEMENT!>!> : AbstractIterableAssert<SELF!, ACTUAL!, ELEMENT!, ELEMENT_ASSERT!>, IndexedObjectEnumerableAssert<SELF!, ELEMENT!> {
|
||||||
|
public constructor AbstractListAssert</*0*/ SELF : AbstractListAssert<SELF!, ACTUAL!, ELEMENT!, ELEMENT_ASSERT!>!, /*1*/ ACTUAL : List!, /*2*/ ELEMENT : kotlin.Any!, /*3*/ ELEMENT_ASSERT : AbstractAssert<ELEMENT_ASSERT!, ELEMENT!>!>()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public/*package*/ open fun isNotEmpty(): SELF!
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class AbstractStringAssert</*0*/ SELF : AbstractStringAssert<SELF!>!> : AbstractCharSequenceAssert<SELF!, kotlin.String!> {
|
||||||
|
public constructor AbstractStringAssert</*0*/ SELF : AbstractStringAssert<SELF!>!>()
|
||||||
|
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 fun isEqualTo(/*0*/ expected: kotlin.String!): SELF!
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class Assertions {
|
||||||
|
public constructor Assertions()
|
||||||
|
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
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public open fun </*0*/ ELEMENT : kotlin.Any!> assertThat(/*0*/ actual: (kotlin.collections.MutableList<out ELEMENT!>..kotlin.collections.List<ELEMENT!>?)): ListAssert<ELEMENT!>!
|
||||||
|
public open fun assertThat(/*0*/ actual: kotlin.String!): AbstractStringAssert<*>!
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface EnumerableAssert</*0*/ SELF : EnumerableAssert<SELF!, ELEMENT!>!, /*1*/ ELEMENT : kotlin.Any!> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IndexedObjectEnumerableAssert</*0*/ SELF : IndexedObjectEnumerableAssert<SELF!, ELEMENT!>!, /*1*/ ELEMENT : kotlin.Any!> : ObjectEnumerableAssert<SELF!, ELEMENT!> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class ListAssert</*0*/ ELEMENT : kotlin.Any!> : AbstractListAssert<ListAssert<ELEMENT!>!, List!, ELEMENT!, ObjectAssert!> {
|
||||||
|
public constructor ListAssert</*0*/ ELEMENT : kotlin.Any!>()
|
||||||
|
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 override /*1*/ /*fake_override*/ fun isNotEmpty(): ListAssert<ELEMENT!>!
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ObjectEnumerableAssert</*0*/ SELF : ObjectEnumerableAssert<SELF!, ELEMENT!>!, /*1*/ ELEMENT : kotlin.Any!> : EnumerableAssert<SELF!, ELEMENT!> {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class StringAssert : AbstractStringAssert<StringAssert!> {
|
||||||
|
public constructor StringAssert()
|
||||||
|
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 isEqualTo(/*0*/ expected: kotlin.String!): StringAssert!
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
@@ -45,8 +45,8 @@ fun case_2() {
|
|||||||
val x = select(Case2_1(), Case2_2(), null)
|
val x = select(Case2_1(), Case2_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*>> & Interface3? & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*>>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<*> & Interface3? & InterfaceWithTypeParameter1<*>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*>> & Interface3? & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*>>?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<*> & Interface3? & InterfaceWithTypeParameter1<*>?")!>x<!>.ip1test1()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ fun case_3() {
|
|||||||
val x = select(Case3_1(), Case3_2(), null)
|
val x = select(Case3_1(), Case3_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & Interface3? & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & Interface3? & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & Interface3? & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & Interface3? & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & Interface3? & InterfaceWithTypeParameter1<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & Interface3? & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,9 +72,9 @@ fun case_4() {
|
|||||||
val x = select(Case4_1(), Case4_2(), null)
|
val x = select(Case4_1(), Case4_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*> & InterfaceWithTypeParameter1<*>? & InterfaceWithTypeParameter2<*>?")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,9 +100,9 @@ fun case_6() {
|
|||||||
val x = select(Case6_1<Int>(), Case6_2<Float>(), null)
|
val x = select(Case6_1<Int>(), Case6_2<Float>(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>>?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>>?")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<*>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>>>?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>> & InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>>>?")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,8 +114,8 @@ fun case_7() {
|
|||||||
val x = select(Case7_1<Int, Float>(), Case7_2<Char, String>(), null)
|
val x = select(Case7_1<Int, Float>(), Case7_2<Char, String>(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<*> & java.io.Serializable>, out Inv<out kotlin.Comparable<*> & java.io.Serializable>> & InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<*> & java.io.Serializable>, out Inv<out kotlin.Comparable<*> & java.io.Serializable>>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable>, out Inv<out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>> & InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable>, out Inv<out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<*> & java.io.Serializable>, out Inv<out kotlin.Comparable<*> & java.io.Serializable>> & InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<*> & java.io.Serializable>, out Inv<out kotlin.Comparable<*> & java.io.Serializable>>?")!>x<!>.ip2test()
|
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable>, out Inv<out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>> & InterfaceWithTwoTypeParameters<out Inv<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable>, out Inv<out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>>?")!>x<!>.ip2test()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,24 +127,24 @@ fun case_8() {
|
|||||||
val x = select(Case8_1<Int, Float>(), Case8_2<Char, String>(), null)
|
val x = select(Case8_1<Int, Float>(), Case8_2<Char, String>(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>.test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>.test1()
|
||||||
val y = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>.test2()
|
val y = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>x<!>.test2()
|
||||||
if (y != null) {
|
if (y != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>?")!>y<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>y<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>?")!>y<!>.test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>y<!>.test1()
|
||||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<*> & java.io.Serializable, out kotlin.Comparable<*> & java.io.Serializable>?")!>y<!>.test2()
|
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable> & ClassWithTwoTypeParameters<out kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable, out kotlin.Comparable<kotlin.Float & kotlin.Char> & java.io.Serializable>?")!>y<!>.test2()
|
||||||
if (z != null) {
|
if (z != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.equals(null)
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.equals(null)
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.propT
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.propT
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.propAny
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.propAny
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.propNullableT
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.propNullableT
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.propNullableAny
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.propNullableAny
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.funT()
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.funT()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.funAny()
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.funAny()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.funNullableT()
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.funNullableT()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<*> & java.io.Serializable & kotlin.Comparable<*>? & java.io.Serializable?")!>z<!>.funNullableAny()
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Comparable<kotlin.Int & kotlin.String> & java.io.Serializable & kotlin.Comparable<kotlin.Int & kotlin.String>? & java.io.Serializable?")!>z<!>.funNullableAny()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ fun case_2() {
|
|||||||
val x = select(Case2_1(), Case2_2(), null)
|
val x = select(Case2_1(), Case2_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*>}>} & {Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*>}>}?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<*>} & {Interface3 & InterfaceWithTypeParameter1<*>}?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*>}>} & {Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*>}>}?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<*>} & {Interface3 & InterfaceWithTypeParameter1<*>}?")!>x<!>.ip1test1()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ fun case_3() {
|
|||||||
val x = select(Case3_1(), Case3_2(), null)
|
val x = select(Case3_1(), Case3_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {Interface3 & InterfaceWithTypeParameter1<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {Interface3 & InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,9 +72,9 @@ fun case_4() {
|
|||||||
val x = select(Case4_1(), Case4_2(), null)
|
val x = select(Case4_1(), Case4_2(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>} & {InterfaceWithTypeParameter1<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}> & InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>}?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>} & {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}?")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,9 +100,9 @@ fun case_6() {
|
|||||||
val x = select(Case6_1<Int>(), Case6_2<Float>(), null)
|
val x = select(Case6_1<Int>(), Case6_2<Float>(), null)
|
||||||
|
|
||||||
if (x != null) {
|
if (x != null) {
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>}?")!>x<!>
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>?}")!>x<!>
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>}?")!>x<!>.ip1test1()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>?}")!>x<!>.ip1test1()
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<*> & InterfaceWithTypeParameter2<*>}>>}?")!>x<!>.ip1test2()
|
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<*>> & InterfaceWithTypeParameter2<*>}>>?}")!>x<!>.ip1test2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+73
-5
@@ -10233,11 +10233,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("recursiveTypes.kt")
|
|
||||||
public void testRecursiveTypes() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
||||||
@@ -11276,6 +11271,79 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class RecursiveTypes extends AbstractDiagnosticsTestWithFirValidation {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInRecursiveTypes() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("multirecursion.kt")
|
||||||
|
public void testMultirecursion() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInIn.kt")
|
||||||
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInInv.kt")
|
||||||
|
public void testRecursiveInInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInOut.kt")
|
||||||
|
public void testRecursiveInOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvIn.kt")
|
||||||
|
public void testRecursiveInvIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvOut.kt")
|
||||||
|
public void testRecursiveInvOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutIn.kt")
|
||||||
|
public void testRecursiveOutIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutInv.kt")
|
||||||
|
public void testRecursiveOutInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutOut.kt")
|
||||||
|
public void testRecursiveOutOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypeWithNonStarResult.kt")
|
||||||
|
public void testRecursiveTypeWithNonStarResult() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypeWithNonStarResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypes.kt")
|
||||||
|
public void testRecursiveTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("twoTypeConstructors.kt")
|
||||||
|
public void testTwoTypeConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/twoTypeConstructors.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+5
@@ -2946,6 +2946,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveFlexibleAssertions.kt")
|
||||||
|
public void testRecursiveFlexibleAssertions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -2946,6 +2946,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveFlexibleAssertions.kt")
|
||||||
|
public void testRecursiveFlexibleAssertions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Generated
+73
-5
@@ -10228,11 +10228,6 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("recursiveTypes.kt")
|
|
||||||
public void testRecursiveTypes() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt");
|
||||||
@@ -11271,6 +11266,79 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class RecursiveTypes extends AbstractDiagnosticsUsingJavacTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInRecursiveTypes() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("multirecursion.kt")
|
||||||
|
public void testMultirecursion() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInIn.kt")
|
||||||
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInInv.kt")
|
||||||
|
public void testRecursiveInInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInOut.kt")
|
||||||
|
public void testRecursiveInOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvIn.kt")
|
||||||
|
public void testRecursiveInvIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveInvOut.kt")
|
||||||
|
public void testRecursiveInvOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveInvOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutIn.kt")
|
||||||
|
public void testRecursiveOutIn() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutIn.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutInv.kt")
|
||||||
|
public void testRecursiveOutInv() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutInv.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveOutOut.kt")
|
||||||
|
public void testRecursiveOutOut() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveOutOut.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypeWithNonStarResult.kt")
|
||||||
|
public void testRecursiveTypeWithNonStarResult() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypeWithNonStarResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveTypes.kt")
|
||||||
|
public void testRecursiveTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/recursiveTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("twoTypeConstructors.kt")
|
||||||
|
public void testTwoTypeConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/twoTypeConstructors.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
@TestMetadata("compiler/testData/diagnostics/tests/inference/regressions")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user