From 6fcecfdb78734ab653c4d745550a8c78d28fe3ce Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 30 May 2025 12:53:57 +0200 Subject: [PATCH] Throw an error when attempting to constrain to multiple primitive types --- IDEHelper/Compiler/BfModule.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 5f7a8eba..f76a1446 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -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())