Replace blank messages in OptIn diagnostics #KT-51358 Fixed
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/optInEmptyMessage.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-opt-in=kotlin.RequiresOptIn
|
||||
@@ -0,0 +1,9 @@
|
||||
@RequiresOptIn(message = " ")
|
||||
annotation class EmptyMarker
|
||||
|
||||
@EmptyMarker
|
||||
fun foo() {}
|
||||
|
||||
fun bar() {
|
||||
foo()
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/optInEmptyMessage.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-opt-in=kotlin.RequiresOptIn
|
||||
-Xuse-fir
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
@RequiresOptIn(message = " ")
|
||||
annotation class EmptyMarker
|
||||
|
||||
@EmptyMarker
|
||||
fun foo() {}
|
||||
|
||||
fun bar() {
|
||||
foo()
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user