1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +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
BfTypedValue enumResult;
BfTypeInstance* enumType = NULL;
if ((!target) && (mModule->mCurTypeInstance->IsPayloadEnum()))
{
enumType = mModule->mCurTypeInstance;
//enumResult = CheckEnumCreation(targetSrc, mModule->mCurTypeInstance, methodName, argValues);
}
else if ((!target) && (target.HasType()) && (targetType->IsPayloadEnum()))
BfTypeInstance* enumType = NULL;
if ((!target) && (target.HasType()) && (targetType->IsPayloadEnum()))
{
enumType = targetType->ToTypeInstance();
//enumResult = CheckEnumCreation(targetSrc, enumType, methodName, argValues);
enumType = targetType->ToTypeInstance();
}
else if ((!target) && (!target.HasType()) && (mModule->mCurTypeInstance->IsPayloadEnum()))
{
enumType = mModule->mCurTypeInstance;
}
if (enumType != NULL)