diff --git a/BeefLibs/corlib/src/Type.bf b/BeefLibs/corlib/src/Type.bf index 15263972..824558f0 100644 --- a/BeefLibs/corlib/src/Type.bf +++ b/BeefLibs/corlib/src/Type.bf @@ -394,6 +394,22 @@ namespace System } } + public bool IsStatic + { + get + { + return (mTypeFlags & .Static) != 0; + } + } + + public bool IsAbstract + { + get + { + return (mTypeFlags & .Abstract) != 0; + } + } + public virtual int32 GenericParamCount { get @@ -1461,6 +1477,9 @@ namespace System.Reflection Function = 0x40000, HasDestructor = 0x80000, GenericParam = 0x100000, + + Static = 0x200000, + Abstract = 0x400000, } public enum FieldFlags : uint16 diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index cab53a14..4d171491 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -5997,6 +5997,11 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary& usedStrin if ((type->mDefineState != BfTypeDefineState_CETypeInit) && (type->WantsGCMarking())) typeFlags |= BfTypeFlags_WantsMarking; + if ((typeInstance != NULL) && (typeInstance->mTypeDef->mIsStatic)) + typeFlags |= BfTypeFlags_Static; + if ((typeInstance != NULL) && (typeInstance->mTypeDef->mIsAbstract)) + typeFlags |= BfTypeFlags_Abstract; + int virtSlotIdx = -1; if ((typeInstance != NULL) && (typeInstance->mSlotNum >= 0)) virtSlotIdx = typeInstance->mSlotNum + 1 + mCompiler->GetDynCastVDataCount(); diff --git a/IDEHelper/Compiler/BfSystem.h b/IDEHelper/Compiler/BfSystem.h index da9a8053..356612af 100644 --- a/IDEHelper/Compiler/BfSystem.h +++ b/IDEHelper/Compiler/BfSystem.h @@ -220,7 +220,10 @@ enum BfTypeFlags BfTypeFlags_Delegate = 0x20000, BfTypeFlags_Function = 0x40000, BfTypeFlags_HasDestructor = 0x80000, - BfTypeFlags_GenericParam = 0x100000 + BfTypeFlags_GenericParam = 0x100000, + + BfTypeFlags_Static = 0x200000, + BfTypeFlags_Abstract = 0x400000, }; enum BfMethodFlags