diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index ab87ed9b46aab0375ecb4a7396fca515aedbbab6..32042f6b99464b56e1d0734929dc56e4325f8c93 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -3283,6 +3283,7 @@ static void ProcessRequiredFields(ArenaUnorderedMapClone(checker->Allocator(), st); + clone->CleanCheckInformation(); st->AddProperty(clone); clone->Check(checker); } diff --git a/ets2panda/test/runtime/ets/Annotation_MemberExpression_Object_TsType.ets b/ets2panda/test/runtime/ets/Annotation_MemberExpression_Object_TsType.ets new file mode 100644 index 0000000000000000000000000000000000000000..d1ec3fc0714c7dc4d5e1fbfc3d4d54b83bf28222 --- /dev/null +++ b/ets2panda/test/runtime/ets/Annotation_MemberExpression_Object_TsType.ets @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace MyNamespace { + export enum MyEnum { + EnumField1 = 0, + EnumField2 = 1 + } +} +@interface ClassAnnotation { + field: MyNamespace.MyEnum = MyNamespace.MyEnum.EnumField1; +} +@ClassAnnotation +class MyClass { +}