Add tests on RequireKotlin on nested classes with metadata version 1.4
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
package a
|
||||
|
||||
import kotlin.internal.RequireKotlin
|
||||
|
||||
class Outer {
|
||||
@RequireKotlin("1.44")
|
||||
class Nested {
|
||||
@RequireKotlin("1.88")
|
||||
fun f() {}
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.2
|
||||
fun test(a: Outer.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.2
|
||||
a.f()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import a.Outer
|
||||
|
||||
fun test(a: Outer.Nested) {
|
||||
a.f()
|
||||
}
|
||||
Reference in New Issue
Block a user