浏览代码

Fixed invalid autoprop optimization with virtual properties

Brian Fiete 4 年之前
父节点
当前提交
f2eb588de3
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 6
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -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;