mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fixed invalid autoprop optimization with virtual properties
This commit is contained in:
parent
84a0cf329f
commit
f2eb588de3
1 changed files with 1 additions and 6 deletions
|
@ -4440,7 +4440,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
||||||
{
|
{
|
||||||
if (auto propertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(mPropDef->mFieldDeclaration))
|
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;
|
bool hasSetter = GetPropertyMethodDef(mPropDef, BfMethodType_PropertySetter, BfCheckedKind_NotSet, mPropTarget) != NULL;
|
||||||
auto autoFieldName = curCheckType->mTypeDef->GetAutoPropertyName(propertyDeclaration);
|
auto autoFieldName = curCheckType->mTypeDef->GetAutoPropertyName(propertyDeclaration);
|
||||||
|
@ -15651,11 +15651,6 @@ BfTypedValue BfExprEvaluator::GetResult(bool clearResult, bool resolveGenericTyp
|
||||||
return mResult;
|
return mResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchedMethod->mName == "get__Hitbox")
|
|
||||||
{
|
|
||||||
NOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto methodInstance = GetPropertyMethodInstance(matchedMethod);
|
auto methodInstance = GetPropertyMethodInstance(matchedMethod);
|
||||||
if (methodInstance.mMethodInstance == NULL)
|
if (methodInstance.mMethodInstance == NULL)
|
||||||
return mResult;
|
return mResult;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue