1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Throw an error when attempting to constrain to multiple primitive types

This commit is contained in:
Brian Fiete 2025-05-30 12:53:57 +02:00
parent 5b18e380a5
commit 6fcecfdb78

View file

@ -8653,6 +8653,8 @@ void BfModule::ResolveGenericParamConstraints(BfGenericParamInstance* genericPar
if (checkEquality)
{
if (genericParamInstance->mTypeConstraint != NULL)
Fail("Only one concrete type constraint may be specified", constraintTypeRef);
genericParamInstance->mTypeConstraint = constraintType;
}
else if (constraintType->IsInterface())