[NI] Don't discriminate Nothing-type from resulting ones
^KT-32106 Fixed
This commit is contained in:
committed by
Pavel Kirpichenkov
parent
a8e9a6a1d0
commit
ae1630f376
@@ -4,7 +4,7 @@ fun foo(): String {
|
||||
s = null
|
||||
<!DEBUG_INFO_CONSTANT!>s<!>?.length
|
||||
<!OI;DEBUG_INFO_CONSTANT!>s<!><!UNSAFE_CALL!>.<!>length
|
||||
if (<!SENSELESS_COMPARISON!><!DEBUG_INFO_CONSTANT!>s<!> == null<!>) return <!ALWAYS_NULL!>s<!>!!
|
||||
if (<!SENSELESS_COMPARISON!><!DEBUG_INFO_CONSTANT!>s<!> == null<!>) <!NI;UNREACHABLE_CODE!>return<!> <!ALWAYS_NULL!>s<!>!!
|
||||
var t: String? = "y"
|
||||
if (t == null) t = "x"
|
||||
var x: Int? = null
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
class MyClass
|
||||
|
||||
operator fun MyClass.inc(): MyClass { <!OI;UNREACHABLE_CODE!>return<!> null!! }
|
||||
operator fun MyClass.inc(): MyClass { <!UNREACHABLE_CODE!>return<!> null!! }
|
||||
|
||||
public fun box() : MyClass? {
|
||||
var i : MyClass?
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
class MyClass
|
||||
|
||||
operator fun MyClass.inc(): MyClass { <!OI;UNREACHABLE_CODE!>return<!> null!! }
|
||||
operator fun MyClass.inc(): MyClass { <!UNREACHABLE_CODE!>return<!> null!! }
|
||||
|
||||
public fun box() {
|
||||
var i : MyClass?
|
||||
|
||||
Reference in New Issue
Block a user