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

Fixed payload enum ctor when current type is a payload enum

This commit is contained in:
Brian Fiete 2021-02-24 12:15:29 -08:00
parent a3c4c479fc
commit 25dce88509

View file

@ -8323,16 +8323,14 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
{ {
// Check for payload enum initialization first // Check for payload enum initialization first
BfTypedValue enumResult; BfTypedValue enumResult;
BfTypeInstance* enumType = NULL; BfTypeInstance* enumType = NULL;
if ((!target) && (mModule->mCurTypeInstance->IsPayloadEnum())) if ((!target) && (target.HasType()) && (targetType->IsPayloadEnum()))
{
enumType = mModule->mCurTypeInstance;
//enumResult = CheckEnumCreation(targetSrc, mModule->mCurTypeInstance, methodName, argValues);
}
else if ((!target) && (target.HasType()) && (targetType->IsPayloadEnum()))
{ {
enumType = targetType->ToTypeInstance(); enumType = targetType->ToTypeInstance();
//enumResult = CheckEnumCreation(targetSrc, enumType, methodName, argValues); }
else if ((!target) && (!target.HasType()) && (mModule->mCurTypeInstance->IsPayloadEnum()))
{
enumType = mModule->mCurTypeInstance;
} }
if (enumType != NULL) if (enumType != NULL)