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

Disallow 'null' for inferred generic argument

This commit is contained in:
Brian Fiete 2020-09-21 22:46:03 -07:00
parent 965e2e2930
commit 989f9e6019

View file

@ -260,6 +260,8 @@ bool BfGenericInferContext::InferGenericArgument(BfMethodInstance* methodInstanc
// Disallow illegal types // Disallow illegal types
if (argType->IsRef()) if (argType->IsRef())
return; return;
if (argType->IsNull())
return;
} }
if ((*mCheckMethodGenericArguments)[wantGenericParam->mGenericParamIdx] != argType) if ((*mCheckMethodGenericArguments)[wantGenericParam->mGenericParamIdx] != argType)