[FIR JS] Fix current tests

This commit is contained in:
Nikolay Lunyak
2022-03-28 11:38:26 +03:00
committed by teamcity
parent c2cecb2818
commit 62ec19bda2
50 changed files with 1277 additions and 2 deletions
@@ -21,8 +21,8 @@ import p.*
class K: J.C() {
fun <!UNSUPPORTED!>dynamic<!>.test() {
<!INVISIBLE_REFERENCE!>sam<!>(null)
<!INVISIBLE_REFERENCE!>sam<!>(
sam(null)
sam(
name = null,
name = null
)
@@ -0,0 +1,23 @@
FILE fqName:<root> fileName:/dynamicAndMembersOfAny.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.String
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): kotlin.String declared in <root>'
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): kotlin.Int declared in <root>'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
FUN name:test3 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (d: dynamic): kotlin.Boolean declared in <root>'
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_VAR 'd: dynamic declared in <root>.test3' type=dynamic origin=null
other: CONST Int type=kotlin.Int value=42
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
fun test1(d: dynamic) = d.toString()
@@ -0,0 +1,24 @@
FILE fqName:<root> fileName:/dynamicArrayAccess.kt
FUN name:testArrayAccess1 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testArrayAccess1 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAccess1' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
FUN name:testArrayAccess2 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testArrayAccess2 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: DYN_OP operator=INVOKE type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAccess2' type=dynamic origin=VARIABLE_AS_FUNCTION
0: CONST String type=kotlin.String value="KEY"
FUN name:testArrayAccess3 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testArrayAccess3 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='get' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testArrayAccess3' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testArrayAccess1(d: dynamic) = d["KEY"]
fun testArrayAccess2(d: dynamic) = d()["KEY"]
@@ -0,0 +1,19 @@
FILE fqName:<root> fileName:/dynamicArrayAssignment.kt
FUN name:testArrayAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
DYN_OP operator=EQ type=dynamic
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST Int type=kotlin.Int value=1
FUN name:testArrayAssignmentFake visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='set' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testArrayAssignmentFake' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
1: CONST Int type=kotlin.Int value=2
@@ -0,0 +1,8 @@
fun testArrayAssignment(d: dynamic) {
d["KEY"] = 1 /*~> Unit */
}
fun testArrayAssignmentFake(d: dynamic) {
d.set("KEY", 2) /*~> Unit */
}
@@ -0,0 +1,29 @@
FILE fqName:<root> fileName:/dynamicArrayAugmentedAssignment.kt
FUN name:testArrayAugmentedAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
DYN_OP operator=PLUSEQ type=kotlin.Unit
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAugmentedAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST String type=kotlin.String value="+="
DYN_OP operator=MINUSEQ type=kotlin.Unit
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAugmentedAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST String type=kotlin.String value="-="
DYN_OP operator=MULEQ type=kotlin.Unit
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAugmentedAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST String type=kotlin.String value="*="
DYN_OP operator=DIVEQ type=kotlin.Unit
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAugmentedAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST String type=kotlin.String value="/="
DYN_OP operator=MODEQ type=kotlin.Unit
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayAugmentedAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="KEY"
0: CONST String type=kotlin.String value="%="
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testArrayAugmentedAssignment(d: dynamic) {
d["KEY"] += "+="
d["KEY"] -= "-="
@@ -0,0 +1,24 @@
FILE fqName:<root> fileName:/dynamicArrayIncrementDecrement.kt
FUN name:testArrayIncrementDecrement visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
VAR name:t1 type:dynamic [val]
DYN_OP operator=PREFIX_INCREMENT type=dynamic
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayIncrementDecrement' type=dynamic origin=null
0: CONST String type=kotlin.String value="prefixIncr"
VAR name:t2 type:dynamic [val]
DYN_OP operator=PREFIX_DECREMENT type=dynamic
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayIncrementDecrement' type=dynamic origin=null
0: CONST String type=kotlin.String value="prefixDecr"
VAR name:t3 type:dynamic [val]
DYN_OP operator=POSTFIX_INCREMENT type=dynamic
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayIncrementDecrement' type=dynamic origin=null
0: CONST String type=kotlin.String value="postfixIncr"
VAR name:t4 type:dynamic [val]
DYN_OP operator=POSTFIX_DECREMENT type=dynamic
receiver: DYN_OP operator=ARRAY_ACCESS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testArrayIncrementDecrement' type=dynamic origin=null
0: CONST String type=kotlin.String value="postfixDecr"
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testArrayIncrementDecrement(d: dynamic) {
val t1 = ++d["prefixIncr"]
@@ -0,0 +1,29 @@
FILE fqName:<root> fileName:/dynamicBinaryEqualityOperator.kt
FUN name:testEqeq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testEqeq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EQEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testEqeq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testExclEq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExclEq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EXCLEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testExclEq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testEqeqeq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testEqeqeq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EQEQEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testEqeqeq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testExclEqeq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExclEqeq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EXCLEQEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testExclEqeq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testEqeq(d: dynamic) = d == 3
fun testExclEq(d: dynamic) = d != 3
fun testEqeqeq(d: dynamic) = d === 3
@@ -0,0 +1,15 @@
FILE fqName:<root> fileName:/dynamicBinaryLogicalOperator.kt
FUN name:testAndAnd visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testAndAnd (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=ANDAND type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testAndAnd' type=dynamic origin=null
0: GET_VAR 'd: dynamic declared in <root>.testAndAnd' type=dynamic origin=null
FUN name:testOrOr visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testOrOr (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=OROR type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testOrOr' type=dynamic origin=null
0: GET_VAR 'd: dynamic declared in <root>.testOrOr' type=dynamic origin=null
@@ -1,2 +1,3 @@
// FIR_IDENTICAL
fun testAndAnd(d: dynamic) = d && d
fun testOrOr(d: dynamic) = d || d
@@ -0,0 +1,36 @@
FILE fqName:<root> fileName:/dynamicBinaryOperator.kt
FUN name:testBinaryPlus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testBinaryPlus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=BINARY_PLUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testBinaryPlus' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testBinaryMinus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testBinaryMinus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=BINARY_MINUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testBinaryMinus' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testMul visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testMul (d: dynamic): dynamic declared in <root>'
DYN_OP operator=MUL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testMul' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testDiv visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testDiv (d: dynamic): dynamic declared in <root>'
DYN_OP operator=DIV type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testDiv' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testMod visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testMod (d: dynamic): dynamic declared in <root>'
DYN_OP operator=MOD type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testMod' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testBinaryPlus(d: dynamic) = d + 1
fun testBinaryMinus(d: dynamic) = d - 1
fun testMul(d: dynamic) = d * 2
@@ -0,0 +1,29 @@
FILE fqName:<root> fileName:/dynamicBinaryRelationalOperator.kt
FUN name:testLess visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLess (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LT type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLess' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testLessOrEqual visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLessOrEqual (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LE type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLessOrEqual' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testGreater visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testGreater (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=GT type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testGreater' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testGreaterOrEqual visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testGreaterOrEqual (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=GE type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testGreaterOrEqual' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testLess(d: dynamic) = d < 2
fun testLessOrEqual(d: dynamic) = d <= 2
fun testGreater(d: dynamic) = d > 2
@@ -0,0 +1,42 @@
FILE fqName:<root> fileName:/dynamicCall.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
1: CONST Int type=kotlin.Int value=2
2: CONST Int type=kotlin.Int value=3
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): dynamic declared in <root>'
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test2' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test2' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
1: CONST Int type=kotlin.Int value=2
2: CONST Int type=kotlin.Int value=3
FUN name:test3 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test3' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
1: CONST Int type=kotlin.Int value=2
2: CONST Int type=kotlin.Int value=3
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun test1(d: dynamic) = d.member(1, 2, 3)
fun test2(d: dynamic) = d?.member(1, 2, 3)
@@ -0,0 +1,17 @@
FILE fqName:<root> fileName:/dynamicElvisOperator.kt
FUN name:test visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in <root>'
BLOCK type=dynamic origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.test' type=dynamic origin=null
WHEN type=dynamic origin=ELVIS
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="other"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test' type=dynamic origin=null
@@ -0,0 +1,10 @@
fun test(d: dynamic): dynamic {
return { // BLOCK
val <elvis>: dynamic = d
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> "other"
else -> <elvis>
}
}
}
@@ -0,0 +1,8 @@
FILE fqName:<root> fileName:/dynamicExclExclOperator.kt
FUN name:test visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in <root>'
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=dynamic origin=EXCLEXCL
<T0>: dynamic
arg0: GET_VAR 'd: dynamic declared in <root>.test' type=dynamic origin=null
@@ -0,0 +1,3 @@
fun test(d: dynamic): dynamic {
return CHECK_NOT_NULL<dynamic>(arg0 = d)
}
@@ -0,0 +1,8 @@
FILE fqName:<root> fileName:/dynamicExclExclOperator.kt
FUN name:test visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in <root>'
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=dynamic origin=EXCLEXCL
<T0>: dynamic
arg0: GET_VAR 'd: dynamic declared in <root>.test' type=dynamic origin=null
@@ -0,0 +1,17 @@
FILE fqName:<root> fileName:/dynamicInfixCall.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='foo' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=123
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='invoke' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=123
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun test1(d: dynamic) = d foo 123
fun test2(d: dynamic) = d invoke 123
@@ -0,0 +1,24 @@
FILE fqName:<root> fileName:/dynamicMemberAccess.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): dynamic declared in <root>'
DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): dynamic declared in <root>'
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test2' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'val tmp_0: dynamic [val] declared in <root>.test2' type=dynamic origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun test1(d: dynamic) = d.member
fun test2(d: dynamic) = d?.member
@@ -0,0 +1,27 @@
FILE fqName:<root> fileName:/dynamicMemberAssignment.kt
FUN name:testMemberAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
DYN_OP operator=EQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=kotlin.Unit
GET_VAR 'd: dynamic declared in <root>.testMemberAssignment' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testSafeMemberAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=EQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=kotlin.Unit
GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeMemberAssignment' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
@@ -0,0 +1,14 @@
fun testMemberAssignment(d: dynamic) {
d.m = 1
}
fun testSafeMemberAssignment(d: dynamic) {
{ // BLOCK
val tmp0_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.m = 1
}
} /*~> Unit */
}
@@ -0,0 +1,107 @@
FILE fqName:<root> fileName:/dynamicMemberAugmentedAssignment.kt
FUN name:testAugmentedMemberAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
DYN_OP operator=PLUSEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="+="
DYN_OP operator=MINUSEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="-="
DYN_OP operator=MULEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="*="
DYN_OP operator=DIVEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="/="
DYN_OP operator=MODEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="%="
FUN name:testSafeAugmentedMemberAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=PLUSEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="+="
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_1: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=MINUSEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'val tmp_1: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="-="
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_2: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=MULEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'val tmp_2: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="*="
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_3: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=DIVEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'val tmp_3: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="/="
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_4: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=MODEQ type=kotlin.Unit
receiver: DYN_MEMBER memberName='m' type=dynamic
GET_VAR 'val tmp_4: dynamic [val] declared in <root>.testSafeAugmentedMemberAssignment' type=dynamic origin=null
0: CONST String type=kotlin.String value="%="
@@ -0,0 +1,46 @@
fun testAugmentedMemberAssignment(d: dynamic) {
d.m += "+="
d.m -= "-="
d.m *= "*="
d.m /= "/="
d.m %= "%="
}
fun testSafeAugmentedMemberAssignment(d: dynamic) {
{ // BLOCK
val tmp0_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.m += "+="
}
} /*~> Unit */
{ // BLOCK
val tmp1_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.m -= "-="
}
} /*~> Unit */
{ // BLOCK
val tmp2_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.m *= "*="
}
} /*~> Unit */
{ // BLOCK
val tmp3_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null
else -> tmp3_safe_receiver.m /= "/="
}
} /*~> Unit */
{ // BLOCK
val tmp4_safe_receiver: dynamic = d
when {
EQEQ(arg0 = tmp4_safe_receiver, arg1 = null) -> null
else -> tmp4_safe_receiver.m %= "%="
}
} /*~> Unit */
}
@@ -0,0 +1,83 @@
FILE fqName:<root> fileName:/dynamicMemberIncrementDecrement.kt
FUN name:testMemberIncrementDecrement visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
VAR name:t1 type:dynamic [val]
DYN_OP operator=PREFIX_INCREMENT type=dynamic
receiver: DYN_MEMBER memberName='prefixIncr' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testMemberIncrementDecrement' type=dynamic origin=null
VAR name:t2 type:dynamic [val]
DYN_OP operator=PREFIX_DECREMENT type=dynamic
receiver: DYN_MEMBER memberName='prefixDecr' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testMemberIncrementDecrement' type=dynamic origin=null
VAR name:t3 type:dynamic [val]
DYN_OP operator=POSTFIX_INCREMENT type=dynamic
receiver: DYN_MEMBER memberName='postfixIncr' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testMemberIncrementDecrement' type=dynamic origin=null
VAR name:t4 type:dynamic [val]
DYN_OP operator=POSTFIX_DECREMENT type=dynamic
receiver: DYN_MEMBER memberName='postfixDecr' type=dynamic
GET_VAR 'd: dynamic declared in <root>.testMemberIncrementDecrement' type=dynamic origin=null
FUN name:testSafeMemberIncrementDecrement visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
VAR name:t1 type:dynamic [val]
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=PREFIX_INCREMENT type=dynamic
receiver: DYN_MEMBER memberName='prefixIncr' type=dynamic
GET_VAR 'val tmp_0: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
VAR name:t2 type:dynamic [val]
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_1: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=PREFIX_DECREMENT type=dynamic
receiver: DYN_MEMBER memberName='prefixDecr' type=dynamic
GET_VAR 'val tmp_1: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
VAR name:t3 type:dynamic [val]
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_2: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=POSTFIX_INCREMENT type=dynamic
receiver: DYN_MEMBER memberName='postfixIncr' type=dynamic
GET_VAR 'val tmp_2: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
VAR name:t4 type:dynamic [val]
BLOCK type=dynamic origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:dynamic [val]
GET_VAR 'd: dynamic declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
WHEN type=dynamic origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_3: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: DYN_OP operator=POSTFIX_DECREMENT type=dynamic
receiver: DYN_MEMBER memberName='postfixDecr' type=dynamic
GET_VAR 'val tmp_3: dynamic [val] declared in <root>.testSafeMemberIncrementDecrement' type=dynamic origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testMemberIncrementDecrement(d: dynamic) {
val t1 = ++d.prefixIncr
@@ -0,0 +1,19 @@
FILE fqName:<root> fileName:/dynamicUnaryOperator.kt
FUN name:testUnaryMinus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testUnaryMinus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=UNARY_MINUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testUnaryMinus' type=dynamic origin=null
FUN name:testUnaryPlus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testUnaryPlus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=UNARY_PLUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testUnaryPlus' type=dynamic origin=null
FUN name:testExcl visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExcl (d: dynamic): dynamic declared in <root>'
DYN_OP operator=EXCL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testExcl' type=dynamic origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun testUnaryMinus(d: dynamic) = -d
fun testUnaryPlus(d: dynamic) = +d
fun testExcl(d: dynamic) = !d
@@ -0,0 +1,29 @@
FILE fqName:<root> fileName:/dynamicWithSmartCast.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): kotlin.Int declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
then: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=kotlin.String origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.String
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): kotlin.Int declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Array<*>
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
then: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=kotlin.Array<*> origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Array<*>
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
@@ -0,0 +1,14 @@
fun test1(d: dynamic): Int {
return when {
d is String -> d /*~> String */.<get-length>()
else -> -1
}
}
fun test2(d: dynamic): Int {
return when {
d is Array<*> -> d /*~> Array<*> */.<get-size>()
else -> -1
}
}
@@ -0,0 +1,48 @@
FILE fqName:<root> fileName:/implicitCastFromDynamic.kt
PROPERTY name:d visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:d type:dynamic visibility:private [final,static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-d> visibility:public modality:FINAL <> () returnType:dynamic
correspondingProperty: PROPERTY name:d visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-d> (): dynamic declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:dynamic visibility:private [final,static]' type=dynamic origin=null
PROPERTY name:p visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final,static]
EXPRESSION_BODY
TYPE_OP type=kotlin.Int origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Int
CALL 'public final fun <get-d> (): dynamic declared in <root>' type=dynamic origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): kotlin.Int declared in <root>'
TYPE_OP type=kotlin.Int origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Int
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Any
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): kotlin.Any declared in <root>'
TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
FUN name:test3 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Any?
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (d: dynamic): kotlin.Any? declared in <root>'
GET_VAR 'd: dynamic declared in <root>.test3' type=dynamic origin=null
FUN name:test4 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.String
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (d: dynamic): kotlin.String declared in <root>'
TYPE_OP type=kotlin.String origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.String
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='member' type=dynamic
GET_VAR 'd: dynamic declared in <root>.test4' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
1: CONST Int type=kotlin.Int value=2
2: CONST Int type=kotlin.Int value=3
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
val d: dynamic = 1
val p: Int = d
@@ -0,0 +1,79 @@
FILE fqName:<root> fileName:/implicitCastToDynamic.kt
PROPERTY name:d1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:d1 type:dynamic visibility:private [final,static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-d1> visibility:public modality:FINAL <> () returnType:dynamic
correspondingProperty: PROPERTY name:d1 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-d1> (): dynamic declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d1 type:dynamic visibility:private [final,static]' type=dynamic origin=null
PROPERTY name:p visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final,static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null
PROPERTY name:d2 visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:d2 type:dynamic visibility:private [static]
EXPRESSION_BODY
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-d2> visibility:public modality:FINAL <> () returnType:dynamic
correspondingProperty: PROPERTY name:d2 visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-d2> (): dynamic declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d2 type:dynamic visibility:private [static]' type=dynamic origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-d2> visibility:public modality:FINAL <> (<set-?>:dynamic) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:d2 visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:dynamic
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d2 type:dynamic visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: dynamic declared in <root>.<set-d2>' type=dynamic origin=null
FUN name:withDynamic visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withDynamic (d: dynamic): dynamic declared in <root>'
GET_VAR 'd: dynamic declared in <root>.withDynamic' type=dynamic origin=null
FUN name:test1 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun withDynamic (d: dynamic): dynamic declared in <root>' type=dynamic origin=null
d: GET_VAR 's: kotlin.String declared in <root>.test1' type=kotlin.String origin=null
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
VAR name:d type:dynamic [val]
GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
VAR name:d type:dynamic [val]
GET_VAR 'a: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Any, s:kotlin.String, na:kotlin.Any?) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:s index:1 type:kotlin.String
VALUE_PARAMETER name:na index:2 type:kotlin.Any?
BLOCK_BODY
VAR name:d type:dynamic [var]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
SET_VAR 'var d: dynamic [var] declared in <root>.test4' type=kotlin.Unit origin=EQ
GET_VAR 'a: kotlin.Any declared in <root>.test4' type=kotlin.Any origin=null
SET_VAR 'var d: dynamic [var] declared in <root>.test4' type=kotlin.Unit origin=EQ
GET_VAR 'na: kotlin.Any? declared in <root>.test4' type=kotlin.Any? origin=null
SET_VAR 'var d: dynamic [var] declared in <root>.test4' type=kotlin.Unit origin=EQ
GET_VAR 's: kotlin.String declared in <root>.test4' type=kotlin.String origin=null
FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any, s:kotlin.String, na:kotlin.Any?) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:s index:1 type:kotlin.String
VALUE_PARAMETER name:na index:2 type:kotlin.Any?
BLOCK_BODY
CALL 'public final fun <set-d2> (<set-?>: dynamic): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
CALL 'public final fun <set-d2> (<set-?>: dynamic): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 'na: kotlin.Any? declared in <root>.test5' type=kotlin.Any? origin=null
CALL 'public final fun <set-d2> (<set-?>: dynamic): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 's: kotlin.String declared in <root>.test5' type=kotlin.String origin=null
@@ -0,0 +1,42 @@
val d1: dynamic
field = 1
get
val p: Int
field = 1
get
var d2: dynamic
field = <get-p>()
get
set
fun withDynamic(d: dynamic): dynamic {
return d
}
fun test1(s: String) {
withDynamic(d = s) /*~> Unit */
}
fun test2(a: Any) {
val d: dynamic = a
}
fun test3(a: Any?) {
val d: dynamic = a
}
fun test4(a: Any, s: String, na: Any?) {
var d: dynamic = <get-p>()
d = a
d = na
d = s
}
fun test5(a: Any, s: String, na: Any?) {
<set-d2>(<set-?> = a)
<set-d2>(<set-?> = na)
<set-d2>(<set-?> = s)
}
@@ -0,0 +1,61 @@
FILE fqName:<root> fileName:/invokeOperator.kt
FUN name:invoke visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
FUN name:test1 visibility:public modality:FINAL <> (a:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (a: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: GET_VAR 'a: dynamic declared in <root>.test1' type=dynamic origin=VARIABLE_AS_FUNCTION
0: CONST Int type=kotlin.Int value=1
FUN name:test2 visibility:public modality:FINAL <> (a:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (a: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='invoke' type=dynamic
GET_VAR 'a: dynamic declared in <root>.test2' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:test3 visibility:public modality:FINAL <> (a:dynamic, b:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (a: dynamic, b: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: GET_VAR 'a: dynamic declared in <root>.test3' type=dynamic origin=VARIABLE_AS_FUNCTION
0: GET_VAR 'b: dynamic declared in <root>.test3' type=dynamic origin=null
FUN name:test4 visibility:public modality:FINAL <> (a:dynamic, b:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (a: dynamic, b: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='invoke' type=dynamic
GET_VAR 'a: dynamic declared in <root>.test4' type=dynamic origin=null
0: GET_VAR 'b: dynamic declared in <root>.test4' type=dynamic origin=null
FUN name:test5 visibility:public modality:FINAL <> (a:dynamic, b:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test5 (a: dynamic, b: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_OP operator=INVOKE type=dynamic
receiver: GET_VAR 'a: dynamic declared in <root>.test5' type=dynamic origin=VARIABLE_AS_FUNCTION
0: GET_VAR 'b: dynamic declared in <root>.test5' type=dynamic origin=null
0: GET_VAR 'b: dynamic declared in <root>.test5' type=dynamic origin=null
FUN name:test6 visibility:public modality:FINAL <> (a:dynamic, b:dynamic) returnType:dynamic
VALUE_PARAMETER name:a index:0 type:dynamic
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test6 (a: dynamic, b: dynamic): dynamic declared in <root>'
DYN_OP operator=INVOKE type=dynamic
receiver: DYN_MEMBER memberName='invoke' type=dynamic
DYN_OP operator=INVOKE type=dynamic
receiver: GET_VAR 'a: dynamic declared in <root>.test6' type=dynamic origin=VARIABLE_AS_FUNCTION
0: GET_VAR 'b: dynamic declared in <root>.test6' type=dynamic origin=null
0: GET_VAR 'b: dynamic declared in <root>.test6' type=dynamic origin=null
FUN name:test7 visibility:public modality:FINAL <> (a:dynamic) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test7 (a: dynamic): kotlin.Unit declared in <root>'
CALL 'public final fun invoke (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun invoke() {}
fun test1(a: dynamic) = a(1)
@@ -0,0 +1,151 @@
FILE fqName:events fileName:/kt38765.kt
CLASS CLASS name:internal modality:OPEN visibility:public [external] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal
CONSTRUCTOR visibility:public <> () returnType:events.internal [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:internal modality:OPEN visibility:public [external] superTypes:[kotlin.Any]'
CLASS CLASS name:EventEmitterP modality:OPEN visibility:public superTypes:[events.internal]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.EventEmitterP
CONSTRUCTOR visibility:public <> () returnType:events.internal.EventEmitterP [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in events.internal'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:EventEmitterP modality:OPEN visibility:public superTypes:[events.internal]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:EventEmitterS modality:OPEN visibility:public superTypes:[events.internal]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.EventEmitterS
CONSTRUCTOR visibility:public <> (a:kotlin.Any) returnType:events.internal.EventEmitterS
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in events.internal'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:EventEmitterS modality:OPEN visibility:public superTypes:[events.internal]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:NestedExternalObject modality:FINAL visibility:public superTypes:[events.internal]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalObject
CONSTRUCTOR visibility:private <> () returnType:events.internal.NestedExternalObject [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in events.internal'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:NestedExternalObject modality:FINAL visibility:public superTypes:[events.internal]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in events.internal
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ENUM_CLASS name:NestedExternalEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<events.internal.NestedExternalEnum>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalEnum
CONSTRUCTOR visibility:private <> () returnType:events.internal.NestedExternalEnum [primary]
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
<E>: events.internal.NestedExternalEnum
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:NestedExternalEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<events.internal.NestedExternalEnum>]'
ENUM_ENTRY name:A
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in events.internal.NestedExternalEnum'
ENUM_ENTRY name:B
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in events.internal.NestedExternalEnum'
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<events.internal.NestedExternalEnum>
SYNTHETIC_BODY kind=ENUM_VALUES
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:events.internal.NestedExternalEnum
VALUE_PARAMETER name:value index:0 type:kotlin.String
SYNTHETIC_BODY kind=ENUM_VALUEOF
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
overridden:
protected final fun clone (): kotlin.Any declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>, other:events.internal.NestedExternalEnum) returnType:kotlin.Int [fake_override,operator]
overridden:
public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
VALUE_PARAMETER name:other index:0 type:events.internal.NestedExternalEnum
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Int [fake_override]
overridden:
public final fun hashCode (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val]
annotations:
IntrinsicConstEvaluation
overridden:
public final name: kotlin.String [val]
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val]
overridden:
public final ordinal: kotlin.Int [val]
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Int [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
CLASS INTERFACE name:NestedExternalInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalInterface
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -0,0 +1,58 @@
package events
open external class internal {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
open class EventEmitterP : internal {
constructor() /* primary */ {
super/*internal*/()
/* <init>() */
}
}
open class EventEmitterS : internal {
constructor(a: Any) {
super/*internal*/()
/* <init>() */
}
}
object NestedExternalObject : internal {
private constructor() /* primary */ {
super/*internal*/()
/* <init>() */
}
}
enum class NestedExternalEnum : Enum<NestedExternalEnum> {
private constructor() /* primary */ {
super/*Enum*/<NestedExternalEnum>()
/* <init>() */
}
A = NestedExternalEnum()
B = NestedExternalEnum()
fun values(): Array<NestedExternalEnum> /* Synthetic body for ENUM_VALUES */
fun valueOf(value: String): NestedExternalEnum /* Synthetic body for ENUM_VALUEOF */
}
interface NestedExternalInterface {
}
}
@@ -0,0 +1,80 @@
FILE fqName:foo fileName:/nativeNativeKotlin.kt
CLASS CLASS name:A modality:OPEN visibility:public [external] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.A
CONSTRUCTOR visibility:public <> () returnType:foo.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:OPEN visibility:public [external] superTypes:[kotlin.Any]'
FUN name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:foo.A
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:B modality:OPEN visibility:public [external] superTypes:[foo.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.B
CONSTRUCTOR visibility:public <> () returnType:foo.B [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in foo.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:OPEN visibility:public [external] superTypes:[foo.A]'
FUN name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:foo.B
FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [fake_override]
overridden:
public final fun foo (): kotlin.String declared in foo.A
$this: VALUE_PARAMETER name:<this> type:foo.A
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in foo.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in foo.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in foo.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[foo.B]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.C
CONSTRUCTOR visibility:public <> () returnType:foo.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in foo.B'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[foo.B]'
FUN FAKE_OVERRIDE name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String [fake_override]
overridden:
public final fun bar (): kotlin.String declared in foo.B
$this: VALUE_PARAMETER name:<this> type:foo.B
FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [fake_override]
overridden:
public final fun foo (): kotlin.String [fake_override] declared in foo.B
$this: VALUE_PARAMETER name:<this> type:foo.A
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in foo.B
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in foo.B
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in foo.B
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:c type:foo.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in foo.C' type=foo.C origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in foo'
CONST String type=kotlin.String value="OK"
@@ -0,0 +1,37 @@
package foo
open external class A {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
fun foo(): String
}
open external class B : A {
constructor() /* primary */ {
super/*A*/()
/* <init>() */
}
fun bar(): String
}
class C : B {
constructor() /* primary */ {
super/*B*/()
/* <init>() */
}
}
fun box(): String {
val c: C = C()
return "OK"
}