From 6d014575f1ac1aa7235454edddaab6696dfde464 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 6 Jan 2022 10:30:25 -0500 Subject: [PATCH] Handled comptime reflection over NoDecl_AwaitingReference methods --- IDEHelper/Compiler/CeMachine.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index 5c410c18..41794edb 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -8185,6 +8185,14 @@ CeTypeInfo* CeMachine::GetTypeInfo(BfType* type) ceTypeInfo->mRevision = typeInstance->mRevision; for (auto& methodGroup : typeInstance->mMethodInstanceGroups) { + if (methodGroup.mOnDemandKind == BfMethodOnDemandKind_NoDecl_AwaitingReference) + { + auto methodDef = typeInstance->mTypeDef->mMethods[methodGroup.mMethodIdx]; + auto flags = ((methodDef->mGenericParams.size() != 0) || (typeInstance->IsUnspecializedType())) ? BfGetMethodInstanceFlag_UnspecializedPass : BfGetMethodInstanceFlag_None; + flags = (BfGetMethodInstanceFlags)(flags | BfGetMethodInstanceFlag_MethodInstanceOnly); + mCeModule->GetMethodInstance(typeInstance, methodDef, BfTypeVector(), flags); + } + if (methodGroup.mDefault != NULL) { mMethodInstanceSet.Add(methodGroup.mDefault);