{"record":{"id":"d07b4f732ef4c3f2","repo":"puppetlabs/puppet","slug":"no-matching-arity-found-for-func-class-name-wit","errorCode":null,"errorMessage":"No matching arity found for #{func.class.name} with arguments #{value.arguments}","messagePattern":"No matching arity found for #(.+?) with arguments #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/types/type_mismatch_describer.rb","lineNumber":589,"sourceCode":"      unless param_type.instance?(value)\n        errors = describe(param_type, TypeCalculator.singleton.infer_set(value).generalize, [ParameterPathElement.new(param_name)])\n        case errors.size\n        when 0\n          # do nothing\n        when 1\n          raise Puppet::ParseError, \"#{subject}:#{errors[0].format}\"\n        else\n          errors_str = errors.map(&:format).join(\"\\n \")\n          raise Puppet::ParseError, \"#{subject}:\\n #{errors_str}\"\n        end\n      end\n    end\n\n    def get_deferred_function_return_type(value)\n      func = Puppet.lookup(:loaders).private_environment_loader\n                   .load(:function, value.name)\n      dispatcher = func.class.dispatcher.find_matching_dispatcher(value.arguments)\n      raise ArgumentError, \"No matching arity found for #{func.class.name} with arguments #{value.arguments}\" unless dispatcher\n\n      dispatcher.type.return_type\n    end\n    private :get_deferred_function_return_type\n\n    # Validates that all entries in the _param_hash_ exists in the given param_struct, that their type conforms\n    # with the corresponding param_struct element and that all required values are provided.\n    # An error message is created for each problem found.\n    #\n    # @param params_struct [PStructType] Struct to use for validation\n    # @param param_hash [Hash<String,Object>] The parameters to validate\n    # @param missing_ok [Boolean] Do not generate errors on missing parameters\n    # @return [Array<Mismatch>] An array of found errors. An empty array indicates no errors.\n    def describe_struct_signature(params_struct, param_hash, missing_ok = false)\n      param_type_hash = params_struct.hashed_elements\n      result = param_hash.each_key.reject { |name| param_type_hash.include?(name) }.map { |name| InvalidParameter.new(nil, name) }\n\n      params_struct.elements.each do |elem|","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/types/type_mismatch_describer.rb#L571-L607","documentation":"Error \"No matching arity found for #{func.class.name} with arguments #{value.arguments}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/types/type_mismatch_describer.rb:589 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"}