Replace blank messages in OptIn diagnostics #KT-51358 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-02-21 18:15:04 +03:00
committed by Space
parent 4178c8156a
commit b42c236fb3
9 changed files with 52 additions and 4 deletions
+4
View File
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/optInEmptyMessage.kt
-d
$TEMP_DIR$
-opt-in=kotlin.RequiresOptIn
+9
View File
@@ -0,0 +1,9 @@
@RequiresOptIn(message = " ")
annotation class EmptyMarker
@EmptyMarker
fun foo() {}
fun bar() {
foo()
}
+4
View File
@@ -0,0 +1,4 @@
compiler/testData/cli/jvm/optInEmptyMessage.kt:8:5: error: this declaration is experimental and its usage must be marked with '@EmptyMarker' or '@OptIn(EmptyMarker::class)'
foo()
^
COMPILATION_ERROR
+6
View File
@@ -0,0 +1,6 @@
$TESTDATA_DIR$/optInEmptyMessage.kt
-d
$TEMP_DIR$
-opt-in=kotlin.RequiresOptIn
-Xuse-fir
+9
View File
@@ -0,0 +1,9 @@
@RequiresOptIn(message = " ")
annotation class EmptyMarker
@EmptyMarker
fun foo() {}
fun bar() {
foo()
}
+7
View File
@@ -0,0 +1,7 @@
warning: ATTENTION!
This build uses in-dev FIR:
-Xuse-fir
compiler/testData/cli/jvm/optInEmptyMessage.kt:8:5: error: this declaration is experimental and its usage must be marked
foo()
^
COMPILATION_ERROR