Minor. Add tests and comment about copying generic parameters to
constructor, but not function reference to the constructor. #KT-32162
This commit is contained in:
+3
@@ -302,6 +302,9 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
|
||||
val replacement = context.inlineClassReplacements.getReplacementFunction(function)
|
||||
?: return super.visitFunctionReference(expression)
|
||||
|
||||
// In case of callable reference to inline class constructor,
|
||||
// type parameters of the replacement include class's type parameters,
|
||||
// however, expression does not. Thus, we should not include them either.
|
||||
return IrFunctionReferenceImpl(
|
||||
expression.startOffset, expression.endOffset, expression.type,
|
||||
replacement.symbol, function.typeParameters.size,
|
||||
|
||||
Reference in New Issue
Block a user