[IR] Extend test coverage for smart cast handling.
This commit is contained in:
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
FILE fqName:<root> fileName:/nullableAnyAsIntToDouble.kt
|
||||
FUN name:test visibility:public modality:FINAL <> (x:kotlin.Any?, y:kotlin.Double) returnType:kotlin.Boolean
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:y index:1 type:kotlin.Double
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test (x: kotlin.Any?, y: kotlin.Double): kotlin.Boolean declared in <root>'
|
||||
WHEN type=kotlin.Boolean origin=ANDAND
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int
|
||||
GET_VAR 'x: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
|
||||
then: CALL 'public final fun less (arg0: kotlin.Double, arg1: kotlin.Double): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
|
||||
arg0: CALL 'public open fun toDouble (): kotlin.Double declared in kotlin.Int' type=kotlin.Double origin=null
|
||||
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
GET_VAR 'x: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
|
||||
arg1: GET_VAR 'y: kotlin.Double declared in <root>.test' type=kotlin.Double origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CONST Boolean type=kotlin.Boolean value=false
|
||||
Vendored
+1
@@ -1,2 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
fun test(x: Any?, y: Double) =
|
||||
x is Int && x < y
|
||||
Reference in New Issue
Block a user