mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Improved comptime TypeDeclaration support, reworked base type population
This commit is contained in:
parent
16371ab07c
commit
062170d9e0
5 changed files with 22 additions and 9 deletions
|
@ -4240,7 +4240,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
if ((checkType != NULL) && (!checkType->IsInterface()) && (populateBase))
|
||||
{
|
||||
SetAndRestoreValue<BfTypeInstance*> prevBaseType(mContext->mCurTypeState->mCurBaseType, checkType->ToTypeInstance());
|
||||
PopulateType(checkType, (populateType <= BfPopulateType_BaseType) ? BfPopulateType_BaseType : BfPopulateType_Data);
|
||||
PopulateType(checkType, BfPopulateType_Declaration);
|
||||
}
|
||||
|
||||
if (typeInstance->mDefineState >= BfTypeDefineState_Defined)
|
||||
|
@ -4466,7 +4466,9 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
baseTypeInst = ResolveTypeDef(mCompiler->mBfObjectTypeDef)->ToTypeInstance();
|
||||
}
|
||||
}
|
||||
PopulateType(baseTypeInst, BfPopulateType_Data);
|
||||
|
||||
if (populateType > BfPopulateType_CustomAttributes)
|
||||
PopulateType(baseTypeInst, BfPopulateType_Data);
|
||||
|
||||
typeInstance->mBaseTypeMayBeIncomplete = false;
|
||||
|
||||
|
@ -4746,6 +4748,9 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
}
|
||||
}
|
||||
|
||||
if (typeInstance->mDefineState < BfTypeDefineState_HasCustomAttributes)
|
||||
typeInstance->mDefineState = BfTypeDefineState_HasCustomAttributes;
|
||||
|
||||
if (typeInstance->mTypeOptionsIdx == -2)
|
||||
{
|
||||
SetTypeOptions(typeInstance);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue