mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed comptime declaring type with types with extension
This commit is contained in:
parent
2a3efe3698
commit
6fe2a7002a
6 changed files with 54 additions and 21 deletions
|
@ -2068,6 +2068,13 @@ void BfModule::UpdateCEEmit(CeEmitContext* ceEmitContext, BfTypeInstance* typeIn
|
|||
BfDefBuilder defBuilder(mSystem);
|
||||
defBuilder.mCurSource = emitParser;
|
||||
defBuilder.mCurTypeDef = typeInstance->mTypeDef;
|
||||
defBuilder.mCurDeclaringTypeDef = typeInstance->mTypeDef;
|
||||
|
||||
if (typeInstance->mTypeDef->mIsCombinedPartial)
|
||||
{
|
||||
// Always define generated methods on the primary type declaration
|
||||
defBuilder.mCurDeclaringTypeDef = typeInstance->mTypeDef->mPartials[0]->GetLatest();
|
||||
}
|
||||
defBuilder.mPassInstance = mCompiler->mPassInstance;
|
||||
defBuilder.mIsComptime = true;
|
||||
defBuilder.DoVisitChild(typeDeclaration->mDefineNode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue