mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed let ptr = append decltype(_member)();
case
This commit is contained in:
parent
acb64dad0f
commit
0672f43d74
1 changed files with 4 additions and 1 deletions
|
@ -4892,7 +4892,10 @@ BfTypedValue BfExprEvaluator::LoadField(BfAstNode* targetSrc, BfTypedValue targe
|
|||
mModule->Fail(StrFormat("An instance reference is required to reference non-static outer field '%s.%s'", mModule->TypeToString(typeInstance).c_str(), fieldDef->mName.c_str()),
|
||||
targetSrc);
|
||||
else if ((mModule->mCurMethodInstance != NULL) && (mModule->mCurMethodInstance->mMethodDef->mMethodType == BfMethodType_CtorCalcAppend))
|
||||
mModule->Fail(StrFormat("Cannot reference field '%s' before append allocations", fieldDef->mName.c_str()), targetSrc);
|
||||
{
|
||||
if ((mBfEvalExprFlags & BfEvalExprFlags_DeclType) == 0)
|
||||
mModule->Fail(StrFormat("Cannot reference field '%s' before append allocations", fieldDef->mName.c_str()), targetSrc);
|
||||
}
|
||||
else
|
||||
mModule->Fail(StrFormat("Cannot reference non-static field '%s' from a static method", fieldDef->mName.c_str()), targetSrc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue