Files
kotlin-fork/plugins/uast-kotlin/testData/AnnotatedExpressions.kt
T
Jinseong Jeon 7f627ab480 FIR UAST: track all legacy test data since facade class is converted
These are mostly mechanical changes.
2021-05-06 20:19:29 +02:00

32 lines
387 B
Kotlin
Vendored

fun foo() {
@Suppress
foo()
@Suppress
val a = 1
@Suppress
var b = 2
@Suppress
b = a
@Suppress
if (a > 2)
a
else
b
val c = @Suppress a ?: b
}
fun annotatedSwitch(str: String) =
when {
@Suppress("DEPRECATION")
str.isBlank() -> null
str.isNotEmpty() != null -> null
else -> 1
}