mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Proper active project selection for CE typedecls
This commit is contained in:
parent
1e44392da8
commit
d367213c31
1 changed files with 9 additions and 1 deletions
|
@ -3917,8 +3917,16 @@ addr_ce CeContext::GetReflectTypeDecl(int typeId)
|
||||||
if (bfType->mDefineState < BfTypeDefineState_HasCustomAttributes)
|
if (bfType->mDefineState < BfTypeDefineState_HasCustomAttributes)
|
||||||
ceModule->PopulateType(bfType, BfPopulateType_CustomAttributes);
|
ceModule->PopulateType(bfType, BfPopulateType_CustomAttributes);
|
||||||
|
|
||||||
|
BfProject* curProject = NULL;
|
||||||
|
auto activeTypeDef = mCurModule->GetActiveTypeDef();
|
||||||
|
if (activeTypeDef != NULL)
|
||||||
|
curProject = activeTypeDef->mProject;
|
||||||
|
|
||||||
|
if (curProject == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
BfCreateTypeDataContext createTypeDataCtx;
|
BfCreateTypeDataContext createTypeDataCtx;
|
||||||
auto irData = ceModule->CreateTypeDeclData(bfType, mCurModule->mProject);
|
auto irData = ceModule->CreateTypeDeclData(bfType, curProject);
|
||||||
|
|
||||||
BeValue* beValue = NULL;
|
BeValue* beValue = NULL;
|
||||||
if (auto constant = mCeMachine->mCeModule->mBfIRBuilder->GetConstant(irData))
|
if (auto constant = mCeMachine->mCeModule->mBfIRBuilder->GetConstant(irData))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue