1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Support case enum member capture in specialized section

This commit is contained in:
Brian Fiete 2023-11-18 07:42:04 -05:00
parent 2caad245b8
commit cccf4bfe9a

View file

@ -2888,9 +2888,12 @@ BfTypedValue BfModule::TryCaseEnumMatch(BfTypedValue enumVal, BfTypedValue tagVa
continue;
if ((fieldInstance->mIsEnumPayloadCase) && (fieldDef->mName == enumCaseName))
{
if ((!enumType->IsTypeMemberIncluded(fieldDef->mDeclaringType, activeTypeDef, this)) ||
(!enumType->IsTypeMemberAccessible(fieldDef->mDeclaringType, activeTypeDef)))
continue;
if (!IsInSpecializedSection())
{
if ((!enumType->IsTypeMemberIncluded(fieldDef->mDeclaringType, activeTypeDef, this)) ||
(!enumType->IsTypeMemberAccessible(fieldDef->mDeclaringType, activeTypeDef)))
continue;
}
auto resolvePassData = mCompiler->mResolvePassData;
if (resolvePassData != NULL)