From 63b053d7d7c0503d6630453e0db022f478643593 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 24 Feb 2023 07:00:02 -0500 Subject: [PATCH] Properly skip comptime attributes for non-matching extensions --- IDEHelper/Compiler/BfModuleTypeUtils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index e15720b7..746ec982 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -2406,6 +2406,12 @@ void BfModule::HandleCEAttributes(CeEmitContext* ceEmitContext, BfTypeInstance* { for (auto& customAttribute : customAttributes->mAttributes) { + if ((customAttribute.mDeclaringType->IsExtension()) && (typeInstance->IsGenericTypeInstance())) + { + if (!typeInstance->IsTypeMemberIncluded(customAttribute.mDeclaringType, typeInstance->mTypeDef, this)) + continue; + } + auto attrType = customAttribute.mType; BfMethodInstance* methodInstance = NULL;