1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed comptime declaring type with types with extension

This commit is contained in:
Brian Fiete 2021-11-22 17:11:16 -08:00
parent 2a3efe3698
commit 6fe2a7002a
6 changed files with 54 additions and 21 deletions

View file

@ -16566,7 +16566,7 @@ void BfModule::EmitInitBlocks(const std::function<void(BfAstNode*)>& initBlockCa
for (; initMethodDef != NULL; initMethodDef = initMethodDef->mNextWithSameName)
{
if (initMethodDef->mDeclaringType != methodDef->mDeclaringType)
if (initMethodDef->mDeclaringType->GetDefinition() != methodDef->mDeclaringType->GetDefinition())
continue;
if (initMethodDef->mMethodType != BfMethodType_Init)
continue;
@ -20617,7 +20617,7 @@ BfMethodDef* BfModule::GetLocalMethodDef(BfLocalMethod* localMethod)
defBuilder.mCurSource = localMethod->mMethodDeclaration->GetParser();
defBuilder.mPassInstance = mCompiler->mPassInstance;
defBuilder.mCurTypeDef = mCurMethodInstance->mMethodDef->mDeclaringType;
defBuilder.mCurDeclaringTypeDef = defBuilder.mCurTypeDef;
methodDef = defBuilder.CreateMethodDef(methodDeclaration, outerMethodDef);
}
else