Fix bug with bind when one of the parameters is a template type: we need to upgrade any NamedTemplateTypes in the 'bound parameters' RecordType first, before applying the bind to the template type, so that type checking considers the resolved template type.
@@ -229,7 +229,7 @@ final class UpgradeTemplateTypesPass implements CompilerFileSetPass {
if (type.getBoundParameters().isPresent()) {
return TemplateBindingUtil.bindParameters(
templateType,
- type.getBoundParameters().get(),
+ (RecordType) type.getBoundParameters().get().accept(this),
typeRegistry,
errorReporter,
whereToReportErrors);
