{"record":{"id":"2bd7a69f7fa1c03f","repo":"puppetlabs/puppet","slug":"invalid-number-of-type-parameters-specified-typ","errorCode":null,"errorMessage":"Invalid number of type parameters specified: %{type} requires %{required}, %{given} provided","messagePattern":"Invalid number of type parameters specified: %(.+?) requires %(.+?), %(.+?) provided","errorType":"exception","errorClass":"Puppet::ParseError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/types/type_parser.rb","lineNumber":673,"sourceCode":"    end\n  end\n\n  def assert_type(ast, t)\n    raise_invalid_type_specification_error(ast) unless t.is_a?(PAnyType)\n    t\n  end\n\n  def assert_range_parameter(ast, t)\n    raise_invalid_type_specification_error(ast) unless TypeFactory.is_range_parameter?(t)\n  end\n\n  def raise_invalid_type_specification_error(ast)\n    raise Puppet::ParseError, _(\"The expression <%{expression}> is not a valid type specification.\") %\n                              { expression: original_text_of(ast) }\n  end\n\n  def raise_invalid_parameters_error(type, required, given)\n    raise Puppet::ParseError, _(\"Invalid number of type parameters specified: %{type} requires %{required}, %{given} provided\") %\n                              { type: type, required: required, given: given }\n  end\n\n  def raise_unparameterized_type_error(ast)\n    raise Puppet::ParseError, _(\"Not a parameterized type <%{type}>\") % { type: original_text_of(ast) }\n  end\n\n  def raise_unknown_type_error(ast)\n    raise Puppet::ParseError, _(\"Unknown type <%{type}>\") % { type: original_text_of(ast) }\n  end\n\n  def original_text_of(ast)\n    ast.locator.extract_tree_text(ast)\n  end\nend\nend\nend\n","sourceCodeStart":655,"sourceCodeEnd":691,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/types/type_parser.rb#L655-L691","documentation":"Error \"Invalid number of type parameters specified: %{type} requires %{required}, %{given} provided\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/types/type_parser.rb:673 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}