Files
Yan Zhulanow 030dbac1b8 [kotlin] Use WITH_STDLIB directive in tests appeared in Kotlin 1.6.20
GitOrigin-RevId: 940c98e403dc9691d4b92de06f48e175d2ee73b1
2022-02-08 08:52:47 +00:00

16 lines
261 B
Kotlin

// PROBLEM: none
// WITH_STDLIB
// COMPILER_ARGUMENTS: -Xopt-in=kotlin.RequiresOptIn
@RequiresOptIn
annotation class Marker
@Marker
inline fun foo(x: Int): Int = x + 1
@OptIn(Marker::class<caret>)
fun bar(x: Int): Int {
val y = foo(x)
return y * 2
}