Fix signature generation for calls to enum and inner class constructors
The synthesized arguments caused the size of default value mask off by one when it is close to the boundary of Int.SIZE, which in turn resulted in wrong signature at call sites.
This commit is contained in:
committed by
max-kammerer
parent
72fdc648ff
commit
0aee2d0568
+1
-1
@@ -327,13 +327,13 @@ class ExpressionCodegen(
|
||||
}
|
||||
|
||||
callGenerator.beforeValueParametersStart()
|
||||
val defaultMask = DefaultCallArgs(callable.valueParameterTypes.size)
|
||||
val extraArgsShift =
|
||||
when {
|
||||
callee is IrConstructor && callee.parentAsClass.isEnumClass -> 2
|
||||
callee is IrConstructor && callee.parentAsClass.isInner -> 1 // skip the `$outer` parameter
|
||||
else -> 0
|
||||
}
|
||||
val defaultMask = DefaultCallArgs(callable.valueParameterTypes.size - extraArgsShift)
|
||||
val typeParameters = if (callee is IrConstructor)
|
||||
callee.parentAsClass.typeParameters + callee.typeParameters
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user