1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Allow 'var' params indirectly specified (ie: from comptime)

This commit is contained in:
Brian Fiete 2022-04-25 14:57:23 -07:00
parent 100181b062
commit f7abec2283

View file

@ -18717,7 +18717,7 @@ void BfModule::ProcessMethod_SetupParams(BfMethodInstance* methodInstance, BfTyp
auto paramsType = ResolveTypeRef(paramDef->mTypeRef, BfPopulateType_Declaration, BfResolveTypeRefFlag_NoResolveGenericParam);
if (paramsType == NULL)
{
AssertErrorState();
// Had error or 'var'
}
else if (paramsType->IsGenericParam())
{
@ -23378,6 +23378,10 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
{
isValid = true;
}
else if (resolvedParamType->IsVar())
{
isValid = true;
}
else if ((resolvedParamType->IsDelegate()) || (resolvedParamType->IsFunction()))
{
hadDelegateParams = true;