'!!' operator
This commit is contained in:
committed by
Dmitry Petrov
parent
92a7ecfac7
commit
57c1b3e0e2
@@ -0,0 +1,3 @@
|
||||
fun test1(a: Any?) = a!!
|
||||
|
||||
fun test2(a: Any?) = a?.hashCode()!!
|
||||
@@ -0,0 +1,28 @@
|
||||
FILE /bangbang.kt
|
||||
FUN public fun test1(/*0*/ a: kotlin.Any?): kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from=test1
|
||||
WHEN type=kotlin.Any operator=null
|
||||
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
|
||||
arg0: GET_VAR a type=kotlin.Any? operator=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL .THROW_NPE type=kotlin.Nothing operator=EXCLEXCL
|
||||
else: GET_VAR a type=kotlin.Any? operator=null
|
||||
FUN public fun test2(/*0*/ a: kotlin.Any?): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from=test2
|
||||
BLOCK type=kotlin.Int operator=EXCLEXCL
|
||||
VAR val tmp1_notnull: kotlin.Int?
|
||||
WHEN type=kotlin.Int? operator=SAFE_CALL
|
||||
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
|
||||
arg0: GET_VAR a type=kotlin.Any? operator=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL .hashCode type=kotlin.Int operator=null
|
||||
$this: GET_VAR a type=kotlin.Any? operator=null
|
||||
WHEN type=kotlin.Int operator=null
|
||||
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
|
||||
arg0: GET_VAR tmp1_notnull type=kotlin.Int? operator=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL .THROW_NPE type=kotlin.Nothing operator=EXCLEXCL
|
||||
else: GET_VAR tmp1_notnull type=kotlin.Int? operator=null
|
||||
Reference in New Issue
Block a user