blob: 395cc45912e127b735fce0e1c77456891244b65b [file]
// RUN_PIPELINE_TILL: FRONTEND
//KT-2845 Wrong cf-analysys for variable initialization in try..finally
package h
import java.util.ArrayList
private fun doTest() : Int {
var list : MutableList<Int>? ;
try {
list = ArrayList()
// Not-null was just assigned to the list
<!DEBUG_INFO_SMARTCAST!>list<!>.add(3)
return 0 ;
}
finally {
if(<!UNINITIALIZED_VARIABLE!>list<!> != null) { // Must be an ERROR
}
}
}
/* GENERATED_FIR_TAGS: assignment, equalityExpression, functionDeclaration, ifExpression, integerLiteral, javaFunction,
localProperty, nullableType, propertyDeclaration, smartcast, tryExpression */