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

20 lines
261 B
Kotlin

// PROBLEM: none
// WITH_STDLIB
// COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn
@RequiresOptIn
annotation class Marker
@Marker
class Foo {
fun f() {}
}
@OptIn(Marker::class)
val foo = Foo()
@OptIn(<caret>Marker::class)
fun bar() {
val x = foo
}