Browse Source

Skip CheckResultForReading check for 'this' on static properties

Brian Fiete 6 months ago
parent
commit
176947189b
1 changed files with 5 additions and 2 deletions
  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();
 }