mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed qualified wrapped property lookup
This commit is contained in:
parent
2e69fa1b9e
commit
c5f610bae2
1 changed files with 14 additions and 2 deletions
|
@ -8366,8 +8366,20 @@ void BfExprEvaluator::LookupQualifiedStaticField(BfAstNode* nameNode, BfIdentifi
|
|||
|
||||
if (!mResult.mType->IsTypeInstance())
|
||||
{
|
||||
mModule->Fail(StrFormat("Type '%s' has no fields", mModule->TypeToString(mResult.mType).c_str()), nameLeft);
|
||||
return;
|
||||
if (mResult.mType->IsSizedArray())
|
||||
{
|
||||
mResult.mType = mModule->GetWrappedStructType(mResult.mType);
|
||||
mResult.mValue = mModule->mBfIRBuilder->CreateBitCast(mResult.mValue, mModule->mBfIRBuilder->MapTypeInstPtr(mResult.mType->ToTypeInstance()));
|
||||
}
|
||||
else if (mResult.mType->IsWrappableType())
|
||||
{
|
||||
mResult.mType = mModule->GetWrappedStructType(mResult.mType);
|
||||
}
|
||||
else
|
||||
{
|
||||
mModule->Fail(StrFormat("Type '%s' has no fields", mModule->TypeToString(mResult.mType).c_str()), nameLeft);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
mResult = LookupField(nameRight, mResult, fieldName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue