Fix accessibility check for experimental declarations from default scope
#KT-40919 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/useDeclarationThatWasExperimentalWithoutExplicitImport.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-language-version
|
||||
1.3
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@ExperimentalStdlibApi
|
||||
fun test(s: ArrayDeque<Int>): ArrayDeque<Int>? {
|
||||
ArrayDeque<Int>(42)
|
||||
|
||||
val x: ArrayDeque<Int>? = null
|
||||
return x ?: s
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
OK
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/useDeclarationThatWasExperimentalWithoutMarker.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-language-version
|
||||
1.3
|
||||
-Xopt-in=kotlin.ExperimentalStdlibApi
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
OK
|
||||
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/useDeclarationThatWasExperimentalWithoutMarker.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-language-version
|
||||
1.3
|
||||
@@ -0,0 +1,6 @@
|
||||
fun test(s: ArrayDeque<Int>): ArrayDeque<Int>? {
|
||||
ArrayDeque<Int>(42)
|
||||
|
||||
val x: ArrayDeque<Int>? = null
|
||||
return x ?: s
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.kt:1:13: error: this declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
|
||||
fun test(s: ArrayDeque<Int>): ArrayDeque<Int>? {
|
||||
^
|
||||
compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.kt:1:31: error: this declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
|
||||
fun test(s: ArrayDeque<Int>): ArrayDeque<Int>? {
|
||||
^
|
||||
compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.kt:2:5: error: unresolved reference: ArrayDeque
|
||||
ArrayDeque<Int>(42)
|
||||
^
|
||||
compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.kt:4:12: error: this declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
|
||||
val x: ArrayDeque<Int>? = null
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user