blob: f4a5ca9303f89bb506bfe688722ffd05abe74a8f [file]
// RUN_PIPELINE_TILL: BACKEND
// ISSUE: KT-51759
fun testBreak(b: Boolean, s: String?) {
while (b) {
val x: String?
try {
x = s ?: break
} finally {
}
x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
}
}
fun testContinue(b: Boolean, s: String?) {
while (b) {
val x: String?
try {
x = s ?: continue
} finally {
}
x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
}
}
/* GENERATED_FIR_TAGS: assignment, break, checkNotNullCall, continue, elvisExpression, functionDeclaration,
localProperty, nullableType, propertyDeclaration, smartcast, tryExpression, whileLoop */