diff --git a/es2panda/compiler/core/function.cpp b/es2panda/compiler/core/function.cpp index 3f4a050ea07cc44fde3dc3c1d3779b8e2fdf6b89..939d1740acf9659a229b3be83d95518f4fda64e2 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) {