mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
EnumType.UnderlyingType
support, generic enum constraint improvements
This commit is contained in:
parent
64161bf001
commit
1ee0a19bbf
5 changed files with 74 additions and 2 deletions
|
@ -64,6 +64,22 @@ bool BfTypedValue::CanModify() const
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool BfGenericParamInstance::IsEnum()
|
||||
{
|
||||
if ((mGenericParamFlags & BfGenericParamFlag_Enum) != 0)
|
||||
return true;
|
||||
if (mTypeConstraint != NULL)
|
||||
{
|
||||
auto module = mTypeConstraint->GetModule();
|
||||
if ((module != NULL) && (mTypeConstraint->IsInstanceOf(module->mCompiler->mEnumTypeDef)))
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool BfDependencyMap::AddUsedBy(BfType* dependentType, BfDependencyMap::DependencyFlags flags)
|
||||
{
|
||||
BF_ASSERT(dependentType != NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue