[FIR] Do not terminate smartcast CFG nodes when result is Nothing
Terminating a CFG node because the result is Nothing should be reserved for explicit Nothing type definitions, and not apply when smartcasting. This allows boolean expressions to propagate implications correctly even when the RHS is impossible or will never be executed. ^KT-47931 Fixed
This commit is contained in:
@@ -78,7 +78,7 @@ fun case_7() {
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasString) {
|
||||
if (<!SENSELESS_COMPARISON!>x == null<!> && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!> == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
if (<!SENSELESS_COMPARISON!>x == null<!> && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!> == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
|
||||
Reference in New Issue
Block a user