Files
Dmitry Timofeev 599cf35889 [kotlin] Update test options for unnecessary opt-in inspection fix
Changed WITH_RUNTIME test option to WITH_STDLIB (as required for
`master` branch) in the fix for "Unnecessary OptIn annotation" false
positive fix.

^KTIJ-20550 Fixed

GitOrigin-RevId: f5fbcf3fbeb262914a595716a62f94252d98bd82
2022-03-29 20:13:07 +00:00

17 lines
280 B
Kotlin

// WITH_STDLIB
// COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn
@RequiresOptIn
annotation class Marker
open class FooBase
@Marker
class Foo : FooBase()
@OptIn(Marker::class)
fun makeFoo(x: FooBase? = null): FooBase = Foo()
@OptIn(<caret>Marker::class)
val foo = makeFoo()