From fa7792650c6fb4c7f56185c7545a8f1e1167da79 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 1 Jun 2020 07:33:00 -0700 Subject: [PATCH] Fixed mWasGenericParam for ref params --- IDEHelper/Compiler/BfModule.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index b483c880..d9d5b8b9 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -20008,7 +20008,11 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool break; } - methodInstance->mParams[paramIdx + implicitParamCount].mWasGenericParam = defaultMethodInstance->mParams[defaultParamIdx + defaultImplicitParamCount].mResolvedType->IsGenericParam(); + BfType* paramType = defaultMethodInstance->mParams[defaultParamIdx + defaultImplicitParamCount].mResolvedType; + if (paramType->IsRef()) + paramType = paramType->GetUnderlyingType(); + + methodInstance->mParams[paramIdx + implicitParamCount].mWasGenericParam = paramType->IsGenericParam(); paramIdx++; defaultParamIdx++; }