From fd6475c8044d4dc5d21b42a437f08ca147f2e949 Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Wed, 12 May 2021 20:23:35 +0300 Subject: [PATCH] Update tests --- .../java8Tests/jspecify/strictMode/SelfType.fir.txt | 13 +++++++------ .../java8Tests/jspecify/strictMode/SelfType.txt | 12 ++++++------ .../java8Tests/jspecify/warnMode/SelfType.fir.kt | 2 ++ .../java8Tests/jspecify/warnMode/SelfType.kt | 2 ++ .../misc/classTypeParameterBoundWithWarnings.fir.kt | 2 +- .../misc/classTypeParameterBoundWithWarnings.kt | 2 +- .../java8Tests/misc/returnTypeWithWarnings.fir.kt | 2 ++ .../java8Tests/misc/returnTypeWithWarnings.kt | 2 ++ .../misc/valueParameterWithWarnings.fir.kt | 2 ++ .../java8Tests/misc/valueParameterWithWarnings.kt | 2 ++ .../nullabilityWarnings/nullabilityGenerics.kt | 2 +- 11 files changed, 28 insertions(+), 15 deletions(-) diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.txt index 05a06758591..772fe2f87b7 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.txt @@ -2,7 +2,7 @@ package public fun main(/*0*/ ak: AK, /*1*/ akn: AKN, /*2*/ bk: BK, /*3*/ ck: CK, /*4*/ ckn: CKN): kotlin.Unit -public open class AK : SelfType { +public open class AK : SelfType { public constructor AK() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: AK): kotlin.Unit @@ -10,7 +10,7 @@ public open class AK : SelfType { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK!> { +public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK?> { public constructor AKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable AK): kotlin.Unit @@ -18,7 +18,7 @@ public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK!> { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class B : SelfType { +public open class B : SelfType { public constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: B): kotlin.Unit @@ -34,7 +34,7 @@ public open class BK : B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -@org.jspecify.nullness.NullMarked public open class C> : SelfType { +@org.jspecify.nullness.NullMarked public open class C> : SelfType { public constructor C>() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: E): kotlin.Unit @@ -42,7 +42,7 @@ public open class BK : B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class CK : C { +public open class CK : C { public constructor CK() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: CK): kotlin.Unit @@ -50,7 +50,7 @@ public open class CK : C { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class CKN : C<@org.jspecify.nullness.Nullable CK!> { +public open class CKN : C<@org.jspecify.nullness.Nullable CK?> { public constructor CKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable CK): kotlin.Unit @@ -65,3 +65,4 @@ public open class CKN : C<@org.jspecify.nullness.Nullable CK!> { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt index cb7d6eba87d..772fe2f87b7 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt @@ -2,7 +2,7 @@ package public fun main(/*0*/ ak: AK, /*1*/ akn: AKN, /*2*/ bk: BK, /*3*/ ck: CK, /*4*/ ckn: CKN): kotlin.Unit -public open class AK : SelfType { +public open class AK : SelfType { public constructor AK() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: AK): kotlin.Unit @@ -10,7 +10,7 @@ public open class AK : SelfType { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK!> { +public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK?> { public constructor AKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable AK): kotlin.Unit @@ -18,7 +18,7 @@ public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK!> { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class B : SelfType { +public open class B : SelfType { public constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: B): kotlin.Unit @@ -34,7 +34,7 @@ public open class BK : B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -@org.jspecify.nullness.NullMarked public open class C> : SelfType { +@org.jspecify.nullness.NullMarked public open class C> : SelfType { public constructor C>() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: E): kotlin.Unit @@ -42,7 +42,7 @@ public open class BK : B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class CK : C { +public open class CK : C { public constructor CK() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: CK): kotlin.Unit @@ -50,7 +50,7 @@ public open class CK : C { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public open class CKN : C<@org.jspecify.nullness.Nullable CK!> { +public open class CKN : C<@org.jspecify.nullness.Nullable CK?> { public constructor CKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable CK): kotlin.Unit diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.fir.kt index eae15a6b15a..dec96252bd2 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.fir.kt @@ -1,3 +1,5 @@ +// MUTE_FOR_PSI_CLASS_FILES_READING + // FILE: SelfType.java import org.jspecify.nullness.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt index eae15a6b15a..dec96252bd2 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt @@ -1,3 +1,5 @@ +// MUTE_FOR_PSI_CLASS_FILES_READING + // FILE: SelfType.java import org.jspecify.nullness.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.fir.kt index c9e0356f022..42e8d492fce 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.fir.kt @@ -17,7 +17,7 @@ fun main(x: ClassTypeParameterBoundWithWarnings<() val y2 = ClassTypeParameterBoundWithWarnings() - val x3 = ClassTypeParameterBoundWithWarnings(a) + val x3 = ClassTypeParameterBoundWithWarnings(a) val y3 = ClassTypeParameterBoundWithWarnings(b) val x4: ClassTypeParameterBoundWithWarnings<String?> = ClassTypeParameterBoundWithWarnings() diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.kt index c9e0356f022..42e8d492fce 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/classTypeParameterBoundWithWarnings.kt @@ -17,7 +17,7 @@ fun main(x: ClassTypeParameterBoundWithWarnings<() val y2 = ClassTypeParameterBoundWithWarnings() - val x3 = ClassTypeParameterBoundWithWarnings(a) + val x3 = ClassTypeParameterBoundWithWarnings(a) val y3 = ClassTypeParameterBoundWithWarnings(b) val x4: ClassTypeParameterBoundWithWarnings<String?> = ClassTypeParameterBoundWithWarnings() diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.fir.kt index f1b503501db..0ad4f63b76e 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.fir.kt @@ -4,6 +4,8 @@ // MUTE_FOR_PSI_CLASS_FILES_READING // FILE: ReturnTypeWithWarnings.java +// We've already had errors in source mode, so it's relevant only for binaries for now +// INCLUDE_JAVA_AS_BINARY import org.jetbrains.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt index 6f811337a1b..591cb49d247 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt @@ -4,6 +4,8 @@ // MUTE_FOR_PSI_CLASS_FILES_READING // FILE: ReturnTypeWithWarnings.java +// We've already had errors in source mode, so it's relevant only for binaries for now +// INCLUDE_JAVA_AS_BINARY import org.jetbrains.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.fir.kt index 8d67fdd2c57..9667f9badcb 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.fir.kt @@ -4,6 +4,8 @@ // MUTE_FOR_PSI_CLASS_FILES_READING // FILE: ValueParameterWithWarnings.java +// We've already had errors in source mode, so it's relevant only for binaries for now +// INCLUDE_JAVA_AS_BINARY import org.jetbrains.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.kt index 8d67fdd2c57..9667f9badcb 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/valueParameterWithWarnings.kt @@ -4,6 +4,8 @@ // MUTE_FOR_PSI_CLASS_FILES_READING // FILE: ValueParameterWithWarnings.java +// We've already had errors in source mode, so it's relevant only for binaries for now +// INCLUDE_JAVA_AS_BINARY import org.jetbrains.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt index 99211f13d32..cd6104bfed8 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt @@ -28,7 +28,7 @@ class X(t: T?) { a.foo(t) val x: T = a.bam() - val y: T = a.baz() + val y: T = a.baz() } }