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

Fixed GetPropertyMethodDef

This commit is contained in:
Brian Fiete 2020-08-29 14:49:01 -07:00
parent 7b3b6c1c10
commit deccc7dfc6

View file

@ -14855,7 +14855,20 @@ void BfExprEvaluator::Visit(BfInvocationExpression* invocationExpr)
BfMethodDef* BfExprEvaluator::GetPropertyMethodDef(BfPropertyDef* propDef, BfMethodType methodType, BfCheckedKind checkedKind, BfTypedValue propTarget)
{
bool allowMut = (propTarget) && (!propTarget.mType->IsValueType() || propTarget.CanModify());
bool allowMut = true;
if ((propTarget) && (propTarget.mType->IsValueType()))
{
if (propTarget.IsReadOnly())
{
allowMut = false;
}
else if (!propTarget.IsAddr())
{
mModule->PopulateType(propTarget.mType);
if (!propTarget.IsValuelessType())
allowMut = false;
}
}
int bestPri = -1000;
BfMethodDef* matchedMethod = NULL;