mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Allow enum constraint to conform to struct constraint
This commit is contained in:
parent
0bf02b5996
commit
f943c67635
1 changed files with 1 additions and 1 deletions
|
@ -7322,7 +7322,7 @@ bool BfModule::CheckGenericConstraints(const BfGenericParamSource& genericParamS
|
||||||
typeConstraintInst = genericParamInst->mTypeConstraint->ToTypeInstance();
|
typeConstraintInst = genericParamInst->mTypeConstraint->ToTypeInstance();
|
||||||
|
|
||||||
if ((genericParamInst->mGenericParamFlags & BfGenericParamFlag_Struct) &&
|
if ((genericParamInst->mGenericParamFlags & BfGenericParamFlag_Struct) &&
|
||||||
((checkGenericParamFlags & (BfGenericParamFlag_Struct | BfGenericParamFlag_Var)) == 0) && (!checkArgType->IsValueType()))
|
((checkGenericParamFlags & (BfGenericParamFlag_Struct | BfGenericParamFlag_Enum | BfGenericParamFlag_Var)) == 0) && (!checkArgType->IsValueType()))
|
||||||
{
|
{
|
||||||
if (!ignoreErrors)
|
if (!ignoreErrors)
|
||||||
*errorOut = Fail(StrFormat("The type '%s' must be a value type in order to use it as parameter '%s' for '%s'",
|
*errorOut = Fail(StrFormat("The type '%s' must be a value type in order to use it as parameter '%s' for '%s'",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue