Browse Source

Fixed 'Function' constraint

Brian Fiete 2 years ago
parent
commit
19fcb7f890
1 changed files with 2 additions and 0 deletions
  1. 2 0
      IDEHelper/Compiler/BfModule.cpp

+ 2 - 0
IDEHelper/Compiler/BfModule.cpp

@@ -8582,6 +8582,8 @@ bool BfModule::CheckGenericConstraints(const BfGenericParamSource& genericParamS
 				}
 				else if (convCheckConstraint->IsInstanceOf(mCompiler->mDelegateTypeDef))
 					constraintMatched = true;
+				else if ((checkArgType->IsFunction()) && (convCheckConstraint->IsInstanceOf(mCompiler->mFunctionTypeDef)))
+					constraintMatched = true;
 			}
 			else if (CanCast(GetFakeTypedValue(checkArgType), convCheckConstraint))
 			{