[PL] Fix: Don't count value arguments vs value parameters for external functions
This commit is contained in:
committed by
Space Team
parent
b644fc009d
commit
9d3deb7e0e
+15
-6
@@ -753,12 +753,21 @@ internal class PartiallyLinkedIrTreePatcher(
|
|||||||
0 // Does not matter here.
|
0 // Does not matter here.
|
||||||
)
|
)
|
||||||
|
|
||||||
if (this is IrFunctionReference) {
|
when (this) {
|
||||||
// Function references don't contain arguments.
|
is IrFunctionAccessExpression -> {
|
||||||
return null
|
if (function.isExternal) {
|
||||||
} else if (this is IrEnumConstructorCall && (function.parent as? IrClass)?.symbol == builtIns.enumClass) {
|
// External functions may have the default arguments declared in native implementations,
|
||||||
// This is a special case. IrEnumConstructorCall don't contain arguments.
|
// which are not available from Kotlin.
|
||||||
return null
|
return null
|
||||||
|
} else if (this is IrEnumConstructorCall && (function.parent as? IrClass)?.symbol == builtIns.enumClass) {
|
||||||
|
// This is a special case. IrEnumConstructorCall don't contain arguments.
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is IrFunctionReference -> {
|
||||||
|
// Function references don't contain arguments.
|
||||||
|
return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default values are not kept in value parameters of fake override/delegated/override functions.
|
// Default values are not kept in value parameters of fake override/delegated/override functions.
|
||||||
|
|||||||
Reference in New Issue
Block a user