diff --git a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt index 66bb564b098..64c4382cfd6 100644 --- a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt +++ b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt @@ -1,9 +1,7 @@ // FIR_IDENTICAL -// IGNORE_BACKEND_K1: JS_IR -// IGNORE_BACKEND_K1: JS_IR_ES6 annotation class A1 annotation class A2 annotation class A3 -@[A1, A2, A3] fun test() {} +@[A1 A2 A3] fun test() {} diff --git a/compiler/testData/ir/irText/errors/unresolvedReference.kt b/compiler/testData/ir/irText/errors/unresolvedReference.kt index b7ed945a079..a889b26492c 100644 --- a/compiler/testData/ir/irText/errors/unresolvedReference.kt +++ b/compiler/testData/ir/irText/errors/unresolvedReference.kt @@ -2,6 +2,7 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // !IGNORE_ERRORS +// DIAGNOSTICS: -UNRESOLVED_REFERENCE -OVERLOAD_RESOLUTION_AMBIGUITY val test1 = unresolved @@ -10,4 +11,4 @@ val test2: Unresolved = val test3 = 42.unresolved(56) -val test4 = 42 * +val test4 = 42 * diff --git a/compiler/testData/ir/irText/expressions/badBreakContinue.kt b/compiler/testData/ir/irText/expressions/badBreakContinue.kt index d0be6d9ea22..134657018e7 100644 --- a/compiler/testData/ir/irText/expressions/badBreakContinue.kt +++ b/compiler/testData/ir/irText/expressions/badBreakContinue.kt @@ -2,6 +2,7 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // !IGNORE_ERRORS +// DIAGNOSTICS: -BREAK_OR_CONTINUE_OUTSIDE_A_LOOP -NOT_A_LOOP_LABEL -UNRESOLVED_REFERENCE -BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY fun test1() { break diff --git a/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt b/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt index 44be979f371..9a4dc428fdd 100644 --- a/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt +++ b/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt @@ -3,6 +3,7 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // !IGNORE_ERRORS +// DIAGNOSTICS: -NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER -BREAK_OR_CONTINUE_OUTSIDE_A_LOOP -UNEXPECTED_TRAILING_LAMBDA_ON_A_NEW_LINE -NO_VALUE_FOR_PARAMETER -NOT_A_LOOP_LABEL -UNRESOLVED_REFERENCE -TYPE_MISMATCH -BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY // WITH_STDLIB inline fun foo(block: () -> Unit) { block() } diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt index 24bf7714d88..04025ba8dd6 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt @@ -1,27 +1,24 @@ -// IGNORE_BACKEND_K1: JS_IR -// IGNORE_BACKEND_K1: JS_IR_ES6 - fun test1(c: Boolean?) { L@ while (true) { - L2@while (c ?: break) + L2@while (c ?: break) ; } } fun test2(c: Boolean?) { L@ while (true) { - L2@while (c ?: continue) + L2@while (c ?: continue) ; } } fun test3(ss: List?) { L@ while (true) { - L2@for (s in ss ?: continue) + L2@for (s in ss ?: continue) ; } } fun test4(ss: List?) { L@ while (true) { - L2@for (s in ss ?: break) + L2@for (s in ss ?: break) ; } } diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt index bcbd95b0a08..b738779e5b3 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt @@ -4,7 +4,7 @@ // FILE: nnStringVsTXString.kt fun useTX(x: T, fn: () -> T) = fn() -fun testWithNullCheck { +fun testWithNullCheck() { useTX("") { J.notNullString() } } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt index 8e1f9d5fc93..3371971f75a 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt @@ -19,9 +19,13 @@ import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_IR import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_KT_IR import org.jetbrains.kotlin.test.FirParser import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_SIGNATURES +import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.DIAGNOSTICS +import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.LINK_VIA_SIGNATURES import org.jetbrains.kotlin.test.directives.configureFirParser +import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler +import org.jetbrains.kotlin.test.frontend.fir.handlers.FirDiagnosticsHandler import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest import org.jetbrains.kotlin.test.services.sourceProviders.AdditionalDiagnosticsSourceFilesProvider @@ -52,6 +56,8 @@ abstract class AbstractIrTextTest