From b44dc55109aeeec2e835823b36845a6af4ead537 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 8 Dec 2020 16:18:42 +0300 Subject: [PATCH] [TD] Mute some javac tests or update their testdata There was a refactoring of AbstractDiagnosticsTest in 9052ef06 which contains bug that `setupEnvironment` for AbstractDiagnosticsTestUsingJavac was not called, so for last year tests `UsingJavac` had no difference with usual diagnostics tests which causes some contradictions in test data --- .../deprecatedSinceKotlinDeclaration.fir.kt | 1 + .../deprecatedSinceKotlinDeclaration.kt | 1 + .../collectionOverrides/removeAtInt.javac.txt | 35 +++++++++++++++++++ ...NullTypeParameterWithKotlinNullable.fir.kt | 1 + .../notNullTypeParameterWithKotlinNullable.kt | 1 + ...ParameterWithKotlinNullableWarnings.fir.kt | 1 + ...TypeParameterWithKotlinNullableWarnings.kt | 1 + .../basicValueClassDeclaration.fir.kt | 1 + .../basicValueClassDeclaration.kt | 1 + .../basicValueClassDeclarationDisabled.fir.kt | 3 +- .../basicValueClassDeclarationDisabled.kt | 3 +- .../constructorsJvmSignaturesClash.fir.kt | 3 +- .../constructorsJvmSignaturesClash.kt | 3 +- .../delegatedPropertyInValueClass.fir.kt | 3 +- .../delegatedPropertyInValueClass.kt | 3 +- .../functionsJvmSignaturesClash.fir.kt | 3 +- .../functionsJvmSignaturesClash.kt | 3 +- ...tionsJvmSignaturesConflictOnInheritance.kt | 2 ++ .../identityComparisonWithValueClasses.fir.kt | 3 +- .../identityComparisonWithValueClasses.kt | 3 +- .../jvmInlineApplicability.fir.kt | 1 + .../valueClasses/jvmInlineApplicability.kt | 1 + .../valueClasses/lateinitValueClasses.fir.kt | 3 +- .../valueClasses/lateinitValueClasses.kt | 3 +- ...senceOfInitializerBlockInsideValueClass.kt | 2 ++ ...OfPublicPrimaryConstructorForValueClass.kt | 2 ++ ...esWithBackingFieldsInsideValueClass.fir.kt | 1 + ...ertiesWithBackingFieldsInsideValueClass.kt | 1 + .../valueClasses/recursiveValueClasses.fir.kt | 3 +- .../valueClasses/recursiveValueClasses.kt | 3 +- ...embersAndConstructsInsideValueClass.fir.kt | 3 +- ...vedMembersAndConstructsInsideValueClass.kt | 3 +- ...alueClassCanOnlyImplementInterfaces.fir.kt | 3 +- .../valueClassCanOnlyImplementInterfaces.kt | 3 +- ...annotImplementInterfaceByDelegation.fir.kt | 3 +- ...assCannotImplementInterfaceByDelegation.kt | 3 +- ...assConstructorParameterWithDefaultValue.kt | 4 ++- .../valueClassDeclarationCheck.fir.kt | 1 + .../valueClassDeclarationCheck.kt | 1 + .../valueClassImplementsCollection.kt | 2 ++ ...lueClassWithForbiddenUnderlyingType.fir.kt | 1 + .../valueClassWithForbiddenUnderlyingType.kt | 1 + .../valueClassesInsideAnnotations.fir.kt | 3 +- .../valueClassesInsideAnnotations.kt | 3 +- ...varargsOnParametersOfValueClassType.fir.kt | 3 +- .../varargsOnParametersOfValueClassType.kt | 3 +- .../testsWithStdLib/inference/kt36951.fir.kt | 1 + .../inference/kt36951.javac.txt | 26 ++++++++++++++ .../testsWithStdLib/inference/kt36951.kt | 1 + 49 files changed, 138 insertions(+), 25 deletions(-) create mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.javac.txt diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.fir.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.fir.kt index 9f9ead10cba..17137fff6cf 100644 --- a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.fir.kt +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC package kotlin.sub @Deprecated("", ReplaceWith("")) diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt index 6a70d00b41b..da3349e7215 100644 --- a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC package kotlin.sub @Deprecated("", ReplaceWith("")) diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.javac.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.javac.txt index 89cff7b6c76..7e4dcbdc39c 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.javac.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.javac.txt @@ -74,3 +74,38 @@ public abstract class B : kotlin.collections.MutableList, java.util. public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } + +public abstract class D : java.util.AbstractList { + public constructor D() + protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int + public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int + public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.Int!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun add(/*0*/ element: kotlin.Int!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.Int!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.Int! + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.Int!): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.Int!): kotlin.Int + public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator + public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator + invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ p0: kotlin.Int): kotlin.String! + invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ p0: kotlin.Int): kotlin.Unit + public open override /*1*/ fun remove(/*0*/ element: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ fun removeAt(/*0*/ index: kotlin.Int): kotlin.Int + protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.Int!): kotlin.Int! + public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList + public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt index 00e1edee4f5..fe2f57ae149 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // FILE: SLRUMap.java // !LANGUAGE: +ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.kt index bdb2edf8321..6f3750e41e5 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // FILE: SLRUMap.java // !LANGUAGE: +ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt index d1715154e98..a543c1946e4 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // FILE: SLRUMap.java // !LANGUAGE: -ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.kt index 44884f759d2..d845d14c68d 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // FILE: SLRUMap.java // !LANGUAGE: -ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.fir.kt index bf36fea2102..fcfa6043252 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.kt index b27c46ca10e..577f3415aac 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclaration.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt index cdb987b0673..9a4bc272ef9 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: -InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -12,4 +13,4 @@ value object InlineObject value enum class InlineEnum @JvmInline -value class NotVal(x: Int) \ No newline at end of file +value class NotVal(x: Int) diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt index 129eec441aa..32b3ed08bd6 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: -InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -12,4 +13,4 @@ annotation class JvmInline value enum class InlineEnum @JvmInline -value class NotVal(x: Int) \ No newline at end of file +value class NotVal(x: Int) diff --git a/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.fir.kt index f5e19726e2a..b018d9831e5 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -21,4 +22,4 @@ class TestErr1(val a: Int) { class TestErr2(val a: Int, val b: Int) { constructor(x: X) : this(x.x, 1) constructor(z: Z) : this(z.x, 2) -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.kt b/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.kt index 20f1bd2468d..73ca5f4da72 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/constructorsJvmSignaturesClash.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -21,4 +22,4 @@ class TestErr1(val a: Int) { class TestErr2(val a: Int, val b: Int) { constructor(x: X) : this(x.x, 1) constructor(z: Z) : this(z.x, 2) -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.fir.kt index 78978f3ef38..141fd02fafb 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -30,4 +31,4 @@ value class Z(val data: Int) { val testValBySingleton by ValObject var testVarBySingleton by VarObject -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.kt b/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.kt index 1cd281daed8..7c82d21a155 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/delegatedPropertyInValueClass.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -30,4 +31,4 @@ value class Z(val data: Int) { val testValBySingleton by ValObject var testVarBySingleton by VarObject -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.fir.kt index 6b778549a9a..6f9deb73b3c 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -43,4 +44,4 @@ class C { fun testNonGenericVsGeneric(x: X, y: Number) {} fun testNonGenericVsGeneric(x: X, y: T) {} fun testNonGenericVsGeneric(x: X, y: TC) {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.kt b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.kt index 6a1ce3eefc6..83a738bafa6 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesClash.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -43,4 +44,4 @@ class C { fun testNonGenericVsGeneric(x: X, y: Number) {} fun testNonGenericVsGeneric(x: X, y: T) {} fun testNonGenericVsGeneric(x: X, y: TC) {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesConflictOnInheritance.kt b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesConflictOnInheritance.kt index 70b0554c770..d6bb03c2625 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesConflictOnInheritance.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/functionsJvmSignaturesConflictOnInheritance.kt @@ -1,4 +1,6 @@ // FIR_IDENTICAL +// !SKIP_JAVAC +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.fir.kt index dd27c6493d6..0fff9c556ff 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_VARIABLE @@ -25,4 +26,4 @@ fun test(f1: Foo, f2: Foo, b1: Bar, fn1: Foo?, fn2: Foo?) { val d2 = f1 === any || f1 !== any val d3 = any === fn1 || any !== fn1 val d4 = fn1 === any || fn1 !== any -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.kt b/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.kt index 070d5e588e1..fe5dfeaa5ba 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_VARIABLE @@ -25,4 +26,4 @@ fun test(f1: Foo, f2: Foo, b1: Bar, fn1: Foo?, fn2: Foo?) { val d2 = f1 === any || f1 !== any val d3 = any === fn1 || any !== fn1 val d4 = fn1 === any || fn1 !== any -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.fir.kt index 3ad84f8a131..216b252f025 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.kt b/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.kt index 6590b2eeb53..2993956b92f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/jvmInlineApplicability.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.fir.kt index ecd831251b1..d8de417e8f4 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_VARIABLE @@ -12,4 +13,4 @@ lateinit var a: Foo fun foo() { lateinit var b: Foo -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.kt b/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.kt index c92f98de61c..7e534316a9f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/lateinitValueClasses.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_VARIABLE @@ -12,4 +13,4 @@ value class Foo(val x: Int) fun foo() { lateinit var b: Foo -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/presenceOfInitializerBlockInsideValueClass.kt b/compiler/testData/diagnostics/tests/valueClasses/presenceOfInitializerBlockInsideValueClass.kt index 72b125b8752..b502a111072 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/presenceOfInitializerBlockInsideValueClass.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/presenceOfInitializerBlockInsideValueClass.kt @@ -1,4 +1,6 @@ // FIR_IDENTICAL +// !SKIP_JAVAC +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_VARIABLE diff --git a/compiler/testData/diagnostics/tests/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.kt b/compiler/testData/diagnostics/tests/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.kt index 2e5603bb3a3..cf3e71c8731 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.kt @@ -1,4 +1,6 @@ // FIR_IDENTICAL +// !SKIP_JAVAC +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.fir.kt index 600b744d3c8..d4a0c75eb19 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt b/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt index c3d2df146d4..3c9ba609ad5 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.fir.kt index aa805071da2..50de3665385 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -34,4 +35,4 @@ value class TestRecursionInUpperBounds>(val x: @JvmInline value class Id(val x: T) @JvmInline -value class TestRecursionThroughId(val x: Id) \ No newline at end of file +value class TestRecursionThroughId(val x: Id) diff --git a/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.kt b/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.kt index 167a6b5dabc..57d949c9208 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/recursiveValueClasses.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -34,4 +35,4 @@ value class TestRecursionInUpperBounds>(val x: @JvmInline value class Id(val x: T) @JvmInline -value class TestRecursionThroughId(val x: Id) \ No newline at end of file +value class TestRecursionThroughId(val x: Id) diff --git a/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.fir.kt index 1d889336879..32edbbe3dd5 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -51,4 +52,4 @@ value class IC5(val a: String) { constructor(i: Int) : this(i.toString()) { TODO("something") } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.kt b/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.kt index 06debc64d17..c77858a8c9d 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -51,4 +52,4 @@ value class IC5(val a: String) { constructor(i: Int) : this(i.toString()) { TODO("something") } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.fir.kt index 25ea40e9ea2..35a93cd7982 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -17,4 +18,4 @@ value class TestExtendsAbstractClass(val x: Int) : AbstractBaseClass() value class TestExtendsOpenClass(val x: Int) : OpenBaseClass() @JvmInline -value class TestImplementsInterface(val x: Int) : BaseInterface \ No newline at end of file +value class TestImplementsInterface(val x: Int) : BaseInterface diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.kt index 9b2fdd735d9..4550ffa6a89 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCanOnlyImplementInterfaces.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -17,4 +18,4 @@ value class TestExtendsAbstractClass(val x: Int) : OpenBaseClass() @JvmInline -value class TestImplementsInterface(val x: Int) : BaseInterface \ No newline at end of file +value class TestImplementsInterface(val x: Int) : BaseInterface diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt index a59356430e0..40d22cb608a 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -12,4 +13,4 @@ object FooImpl : IFoo value class Test1(val x: Any) : IFoo by FooImpl @JvmInline -value class Test2(val x: IFoo) : IFoo by x \ No newline at end of file +value class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt index f9dbdd81d3e..1aec09d3e4f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -12,4 +13,4 @@ object FooImpl : IFoo value class Test1(val x: Any) : IFoo by FooImpl @JvmInline -value class Test2(val x: IFoo) : IFoo by x \ No newline at end of file +value class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassConstructorParameterWithDefaultValue.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassConstructorParameterWithDefaultValue.kt index 393acf38100..1208b18e499 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassConstructorParameterWithDefaultValue.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassConstructorParameterWithDefaultValue.kt @@ -1,4 +1,6 @@ // FIR_IDENTICAL +// !SKIP_JAVAC +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -6,4 +8,4 @@ package kotlin.jvm annotation class JvmInline @JvmInline -value class Test(val x: Int = 42) \ No newline at end of file +value class Test(val x: Int = 42) diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.fir.kt index 0ca3684d5b3..a555bccb1bf 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.kt index 8deb953d413..a3337a6371a 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassImplementsCollection.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassImplementsCollection.kt index 8d24d41c91c..6f0b197791a 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassImplementsCollection.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassImplementsCollection.kt @@ -1,4 +1,6 @@ // FIR_IDENTICAL +// !SKIP_JAVAC +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.fir.kt index 7ed03f8cdd2..55506c247b5 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt index 3a680ba0dc4..532ed9867e1 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassWithForbiddenUnderlyingType.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.fir.kt index 2a99108dd6a..5445d5d9c4f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -15,4 +16,4 @@ annotation class Ann1(val a: MyInt) annotation class Ann2(val a: Array) annotation class Ann3(vararg val a: MyInt) -annotation class Ann4(val a: KClass) \ No newline at end of file +annotation class Ann4(val a: KClass) diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.kt index 6f583fff243..bbec44460f8 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassesInsideAnnotations.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses package kotlin.jvm @@ -15,4 +16,4 @@ annotation class Ann1(val a: MyInt) annotation class Ann2(val a: Array) annotation class Ann3(vararg val a: MyInt) -annotation class Ann4(val a: KClass) \ No newline at end of file +annotation class Ann4(val a: KClass) diff --git a/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.fir.kt index 3c5e49a25cc..91fa32f9b9b 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.fir.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -UNUSED_ANONYMOUS_PARAMETER @@ -23,4 +24,4 @@ class B(vararg val s: Foo) { constructor(a: Int, vararg s: Foo) : this(*s) } -annotation class Ann(vararg val f: Foo) \ No newline at end of file +annotation class Ann(vararg val f: Foo) diff --git a/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.kt b/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.kt index b12960baf06..c6f060114b0 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/varargsOnParametersOfValueClassType.kt @@ -1,3 +1,4 @@ +// !SKIP_JAVAC // !LANGUAGE: +InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -UNUSED_ANONYMOUS_PARAMETER @@ -23,4 +24,4 @@ class B(vararg val s: Foo) { constructor(a: Int, vararg s: Foo) : this(*s) } -annotation class Ann(vararg val f: Foo) \ No newline at end of file +annotation class Ann(vararg val f: Foo) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt index 7fdcf77c924..3680f122cf3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt @@ -1,3 +1,4 @@ +// !JAVAC_EXPECTED_FILE // !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.javac.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.javac.txt new file mode 100644 index 00000000000..904e4a35ec4 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.javac.txt @@ -0,0 +1,26 @@ +package + +public final class Base : kotlin.collections.HashSet /* = java.util.HashSet */ { + public constructor Base() + invisible_fake final override /*1*/ /*fake_override*/ var map: java.util.HashMap! + public open override /*1*/ /*fake_override*/ val size: kotlin.Int + public open override /*1*/ /*fake_override*/ fun add(/*0*/ element: T): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: T): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator + invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: T): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt index 76d082ad720..18b5943deaa 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt @@ -1,3 +1,4 @@ +// !JAVAC_EXPECTED_FILE // !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER