From c4b3482135243089b07c254c30bfa75fb87b6809 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 3 Jul 2021 07:23:23 -0700 Subject: [PATCH] Fixed [Reflect(.DefaultConstructor)] and [Reflect(.Constructors)] --- IDEHelper/Compiler/BfModule.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 5fa10bed..9ecbcd2c 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -6578,6 +6578,14 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary& usedStrin if ((methodDef->mIsStatic) && ((methodReflectKind & BfReflectKind_StaticMethods) != 0)) includeMethod = true; + if (methodDef->mMethodType == BfMethodType_Ctor) + { + if ((methodReflectKind & BfReflectKind_Constructors) != 0) + includeMethod = true; + if ((methodDef->mParams.IsEmpty()) && ((methodReflectKind & BfReflectKind_DefaultConstructor) != 0)) + includeMethod = true; + } + if ((!includeMethod) && (typeOptions != NULL)) includeMethod = ApplyTypeOptionMethodFilters(includeMethod, methodDef, typeOptions);