1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed 'Function' constraint

This commit is contained in:
Brian Fiete 2023-07-03 10:08:40 -04:00
parent 2beb2231ac
commit 19fcb7f890

View file

@ -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))
{