Files
kotlin-fork/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/classesAndConstructors.fir.kt
T
2022-04-06 12:51:20 +00:00

24 lines
459 B
Kotlin
Vendored

// !API_VERSION: 1.0
@SinceKotlin("1.1")
open class Foo
class Bar @SinceKotlin("1.1") constructor()
@SinceKotlin("1.0")
class Baz @SinceKotlin("1.1") constructor()
@SinceKotlin("1.1")
class Quux @SinceKotlin("1.0") constructor()
fun t1(): Foo = Foo()
// TODO: do not report API_NOT_AVAILABLE twice
fun t2() = object : Foo() {}
fun t3(): Bar? = <!UNRESOLVED_REFERENCE!>Bar<!>()
fun t4(): Baz = <!UNRESOLVED_REFERENCE!>Baz<!>()
fun t5(): Quux = Quux()