浏览代码

Skip CheckResultForReading check for 'this' on static properties

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

+ 5 - 2
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -5284,8 +5284,11 @@ BfTypedValue BfExprEvaluator::LoadProperty(BfAstNode* targetSrc, BfTypedValue ta
 		}
 	}
 
-	SetAndRestoreValue<BfTypedValue> prevResult(mResult, target);
-	CheckResultForReading(mResult);
+	if (!mPropDef->mIsStatic)	
+	{
+		SetAndRestoreValue<BfTypedValue> prevResult(mResult, target);
+		CheckResultForReading(mResult);
+	}
 	return BfTypedValue();
 }