Преглед изворни кода

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();
 }