KT-29959 fix IR generation for 'd.m = e'
This commit is contained in:
+6
-1
@@ -44,7 +44,12 @@ class DynamicMemberLValue(
|
||||
context.irBuiltIns.unitType,
|
||||
IrDynamicOperator.EQ
|
||||
).apply {
|
||||
left = dynamicReceiver
|
||||
left = IrDynamicMemberExpressionImpl(
|
||||
startOffset, endOffset,
|
||||
type,
|
||||
memberName,
|
||||
dynamicReceiver
|
||||
)
|
||||
right = irExpression
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
for (x in BooleanArray(5)) {
|
||||
if (x != false) return "Fail $x"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
for (x in CharArray(5)) {
|
||||
if (x != 0.toChar()) return "Fail $x"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
for (x in LongArray(5)) {
|
||||
if (x != 0.toLong()) return "Fail $x"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val a = LongArray(5)
|
||||
val x = a.iterator()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val a = LongArray(5)
|
||||
val x = a.iterator()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val transform = transform(Array(1) { BooleanArray(1) })
|
||||
if (!transform[0][0]) return "OK"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: JS, JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JS, JVM_IR
|
||||
|
||||
fun foo(vararg l: Long, s: String = "OK"): String =
|
||||
if (l.size == 0) s else "Fail"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val aByte: Array<Byte> = arrayOf<Byte>(1)
|
||||
val bByte: ByteArray = byteArrayOf(1)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
constructor(vararg ys: Long) : this(ys.size)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun booleanVararg(vararg xs: Boolean) {
|
||||
if (xs.size != 1 && xs[0] != true) throw AssertionError()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun barB(vararg args: Byte) = args
|
||||
fun barC(vararg args: Char) = args
|
||||
fun barD(vararg args: Double) = args
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// FILE: 1.kt
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ FILE fqName:<root> fileName:/dynamicMemberAssignment.kt
|
||||
VALUE_PARAMETER name:d index:0 type:dynamic flags:
|
||||
BLOCK_BODY
|
||||
DYN_OP operator=EQ type=kotlin.Unit
|
||||
receiver: GET_VAR 'value-parameter d: dynamic' type=dynamic origin=null
|
||||
receiver: DYN_MEMBER memberName='m' type=kotlin.Unit
|
||||
GET_VAR 'value-parameter d: dynamic' type=dynamic origin=null
|
||||
0: CONST Int type=kotlin.Int value=1
|
||||
FUN name:testSafeMemberAssignment visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Unit flags:
|
||||
VALUE_PARAMETER name:d index:0 type:dynamic flags:
|
||||
@@ -22,5 +23,6 @@ FILE fqName:<root> fileName:/dynamicMemberAssignment.kt
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: DYN_OP operator=EQ type=kotlin.Unit
|
||||
receiver: GET_VAR 'tmp0_safe_receiver: dynamic' type=dynamic origin=null
|
||||
receiver: DYN_MEMBER memberName='m' type=kotlin.Unit
|
||||
GET_VAR 'tmp0_safe_receiver: dynamic' type=dynamic origin=null
|
||||
0: CONST Int type=kotlin.Int value=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1290
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1231
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1294
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1287
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1288
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1321
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1318
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1320
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1283
|
||||
package foo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user