From 15aaf3a0789b175e80da77edcfefee92d79bb7c0 Mon Sep 17 00:00:00 2001 From: SokolovaMaria Date: Thu, 11 Feb 2021 12:24:28 +0300 Subject: [PATCH] Copy typeParameters from original declaration to the exportedDefaultStubFun before substitution of type parameters --- .../kotlin/ir/backend/js/lower/ExportedDefaultParameterStub.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ExportedDefaultParameterStub.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ExportedDefaultParameterStub.kt index a991bb954ee..05f73e148b2 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ExportedDefaultParameterStub.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ExportedDefaultParameterStub.kt @@ -107,9 +107,9 @@ class ExportedDefaultParameterStub(val context: JsIrBackendContext) : Declaratio context.additionalExportedDeclarations.add(exportedDefaultStubFun) - exportedDefaultStubFun.returnType = declaration.returnType.remapTypeParameters(declaration, exportedDefaultStubFun) exportedDefaultStubFun.parent = declaration.parent exportedDefaultStubFun.copyParameterDeclarationsFrom(declaration) + exportedDefaultStubFun.returnType = declaration.returnType.remapTypeParameters(declaration, exportedDefaultStubFun) exportedDefaultStubFun.valueParameters.forEach { it.defaultValue = null } declaration.origin = JsLoweredDeclarationOrigin.JS_SHADOWED_EXPORT