From f85f836f9c481074857f881230378fea21f05a4f Mon Sep 17 00:00:00 2001 From: "584648456@qq.com" Date: Thu, 15 May 2025 14:28:32 +0800 Subject: [PATCH] Title:add checkVariance for construtor Description(optional):add checkVariance for construtor Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/IC80V0 Signed-off-by: semon <584648456@qq.com> --- ets2panda/checker/ets/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ets2panda/checker/ets/helpers.cpp b/ets2panda/checker/ets/helpers.cpp index 298cae4b35..28391e415f 100644 --- a/ets2panda/checker/ets/helpers.cpp +++ b/ets2panda/checker/ets/helpers.cpp @@ -3108,7 +3108,7 @@ void ETSChecker::CheckTypeParameterVariance(ir::ClassDefinition *classDef) } for (auto *it : classDef->Body()) { - if (!it->IsMethodDefinition() || it->AsMethodDefinition()->IsConstructor()) { + if (!it->IsMethodDefinition()) { continue; } // Methods may have out type parameters as return types, and in type parameters as parameter types,(in)=>out -- Gitee