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

Fixed invalid autoprop optimization with virtual properties

This commit is contained in:
Brian Fiete 2020-11-19 14:17:14 -08:00
parent 84a0cf329f
commit f2eb588de3

View file

@ -4440,7 +4440,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
{
if (auto propertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(mPropDef->mFieldDeclaration))
{
if (curCheckType->mTypeDef->HasAutoProperty(propertyDeclaration))
if ((curCheckType->mTypeDef->HasAutoProperty(propertyDeclaration)) && (propertyDeclaration->mVirtualSpecifier == NULL))
{
bool hasSetter = GetPropertyMethodDef(mPropDef, BfMethodType_PropertySetter, BfCheckedKind_NotSet, mPropTarget) != NULL;
auto autoFieldName = curCheckType->mTypeDef->GetAutoPropertyName(propertyDeclaration);
@ -15651,11 +15651,6 @@ BfTypedValue BfExprEvaluator::GetResult(bool clearResult, bool resolveGenericTyp
return mResult;
}
if (matchedMethod->mName == "get__Hitbox")
{
NOP;
}
auto methodInstance = GetPropertyMethodInstance(matchedMethod);
if (methodInstance.mMethodInstance == NULL)
return mResult;