From a86d981a96755ab8da5b6d3045263348b8424885 Mon Sep 17 00:00:00 2001 From: rentangyu Date: Fri, 15 Aug 2025 15:39:07 +0800 Subject: [PATCH] =?UTF-8?q?Duplicate=20identifier=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICT6BA Signed-off-by: rentangyu --- ecmascript/stubs/runtime_stubs-inl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ecmascript/stubs/runtime_stubs-inl.h b/ecmascript/stubs/runtime_stubs-inl.h index 30b41fa8a3..ad7eea6d47 100644 --- a/ecmascript/stubs/runtime_stubs-inl.h +++ b/ecmascript/stubs/runtime_stubs-inl.h @@ -796,6 +796,10 @@ JSTaggedValue RuntimeStubs::RuntimeStGlobalRecord(JSThread *thread, const JSHand // cross files global record name binding judgment int entry = dict->FindEntry(thread, prop.GetTaggedValue()); if (entry != -1) { + std::string message = "Duplicate identifier \""; + message.append(EcmaStringAccessor(JSTaggedValue::ToString(thread, prop)).ToStdString(thread)); + message.append("\""); + LOG_ECMA(ERROR) << message; return RuntimeThrowSyntaxError(thread, "Duplicate identifier"); } -- Gitee