mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fixed GetPropertyMethodDef
This commit is contained in:
parent
7b3b6c1c10
commit
deccc7dfc6
1 changed files with 14 additions and 1 deletions
|
@ -14855,7 +14855,20 @@ void BfExprEvaluator::Visit(BfInvocationExpression* invocationExpr)
|
||||||
|
|
||||||
BfMethodDef* BfExprEvaluator::GetPropertyMethodDef(BfPropertyDef* propDef, BfMethodType methodType, BfCheckedKind checkedKind, BfTypedValue propTarget)
|
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;
|
int bestPri = -1000;
|
||||||
BfMethodDef* matchedMethod = NULL;
|
BfMethodDef* matchedMethod = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue