JVM IR: fix typo in condition in KCallableNamePropertyLowering
This however makes testLocalFunctionName fail because currently isSubclassOf (incorrectly) returns false and therefore an anonymous class is generated and the name is taken from there. The name there is "box$OK" which is incorrect. The isSubclassOf issue is KT-28198 and will be fixed separately; the incorrect name issue will be investigated later
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ private class KCallableNamePropertyTransformer(val lower: KCallableNamePropertyL
|
||||
(it as? IrSimpleFunction)?.correspondingProperty ?: it
|
||||
}
|
||||
val irClass = directMember.parent as? IrClass ?: return expression
|
||||
if (irClass.isSubclassOf(lower.context.irBuiltIns.kCallableClass.owner)) return expression
|
||||
if (!irClass.isSubclassOf(lower.context.irBuiltIns.kCallableClass.owner)) return expression
|
||||
val name = when (directMember) {
|
||||
is IrSimpleFunction -> directMember.name
|
||||
is IrProperty -> directMember.name
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
|
||||
fun box(): String {
|
||||
fun OK() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user