1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Fixed object calls on functions (ie: GCMarkMembers)

This commit is contained in:
Brian Fiete 2020-07-12 06:28:22 -07:00 committed by James Orson
parent 62a28e46be
commit c3c9b84165

View file

@ -5359,7 +5359,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
if (!skipThis) if (!skipThis)
{ {
if ((target) && (target.mType->IsFunction())) if ((target) && (target.mType->IsFunction()) && (methodInstance->GetOwner() == target.mType))
{ {
CheckResultForReading(target); CheckResultForReading(target);
target = mModule->LoadValue(target); target = mModule->LoadValue(target);