blob: 5b9021610056715fa60419d4d20ed0b67d93d51b [file]
// RUN_PIPELINE_TILL: BACKEND
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
// See also: KT-3743
fun foo(arg: Boolean?): String {
// Must be exhaustive
return when(arg) {
true -> "truth"
false -> "falsehood"
null -> "unknown"
}
}
/* GENERATED_FIR_TAGS: equalityExpression, functionDeclaration, nullableType, smartcast, stringLiteral, whenExpression,
whenWithSubject */