From cdbd0eb93267491643b716457e1134c7bd31d91f Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Thu, 29 Jul 2021 17:21:28 +0200 Subject: [PATCH] Reopen KT-47920 test and add missed .txt files #KT-47920 Open --- .../java8Tests/jspecify/warnMode/kt47899.txt | 13 +++++++++++++ .../foreignAnnotationsTests/tests/kt47920.kt | 2 +- .../foreignAnnotationsTests/tests/kt47920.txt | 10 ++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/kt47899.txt create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/kt47899.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/kt47899.txt new file mode 100644 index 00000000000..ccd1bd4286f --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/kt47899.txt @@ -0,0 +1,13 @@ +package + +public fun test(/*0*/ metric: T): kotlin.Unit + +public open class Foo { + public constructor Foo() + 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 gauge(/*0*/ @org.jspecify.nullness.Nullable stateObject: @org.jspecify.nullness.Nullable T!): kotlin.Unit +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt index 613eb2259c5..baaede4d2a9 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt @@ -7,5 +7,5 @@ public class J1<@NonNull T> {} // FILE: main.kt fun main() { - J1<Any?>() // violated nullability, no warnings; but there is an error with -Xtype-enhancement-improvements-strict-mode + J1() // violated nullability, no warnings; but there is an error with -Xtype-enhancement-improvements-strict-mode } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt new file mode 100644 index 00000000000..fbe2791cdfe --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt @@ -0,0 +1,10 @@ +package + +public fun main(): kotlin.Unit + +public open class J1 { + public constructor J1() + 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 +}