Files
kotlin-fork/plugins/uast-kotlin/testData/AnnotatedExpressions.kt
T
Nicolay Mitropolsky b7e715045a Uast: skip KtWhenConditionWithExpression in UAST (KT-38521)
when building parents, because they are anyway ignored in converter
2020-05-06 15:31:19 +03:00

31 lines
386 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
}