psi2ir: inferred type for 'when' is Nothing only if it's exhaustive
TODO: fix inference bug
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ FILE fqName:<root> fileName:/whenByFloatingPoint.kt
|
||||
WHEN type=kotlin.Int origin=WHEN
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double
|
||||
typeOperand: UNBOUND: class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, java.io.Serializable
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Double modality:FINAL visibility:public flags:
|
||||
GET_VAR 'tmp0_subject: Any' type=kotlin.Any origin=null
|
||||
then: CONST Int type=kotlin.Int value=-1
|
||||
BRANCH
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ FILE fqName:<root> fileName:/when.kt
|
||||
then: CONST String type=kotlin.String value=A
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
|
||||
typeOperand: UNBOUND: class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags:
|
||||
GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value=String
|
||||
BRANCH
|
||||
|
||||
Reference in New Issue
Block a user