From 22c51bbd3b98bee44882d90dd6f0dcadf8b4da8c Mon Sep 17 00:00:00 2001 From: hufeng Date: Tue, 20 Sep 2022 20:30:55 +0800 Subject: [PATCH] fixed 4efb874 from https://gitee.com/hufeng20/arkcompiler_ets_frontend/pulls/521 Fix lexical parameter with initialization Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I5S5FX?from=project-issue Test: 262, compiler Signed-off-by: hufeng Change-Id: If3a8308597978043ea779000baa56859f871e1d6 --- es2panda/compiler/core/function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es2panda/compiler/core/function.cpp b/es2panda/compiler/core/function.cpp index 3f4a050ea0..939d1740ac 100644 --- a/es2panda/compiler/core/function.cpp +++ b/es2panda/compiler/core/function.cpp @@ -75,7 +75,7 @@ static void CompileFunctionParameterDeclaration(PandaGen *pg, const ir::ScriptFu if (param->IsAssignmentPattern()) { RegScope rs(pg); - pg->LoadAccumulator(func, paramReg); + ref.GetValue(); auto *nonDefaultLabel = pg->AllocLabel(); if (ref.Kind() == ReferenceKind::DESTRUCTURING) { -- Gitee