{"record":{"id":"38ec50ac54d8a90d","repo":"puppetlabs/puppet","slug":"creation-of-new-instance-of-type-type-is-not","errorCode":null,"errorMessage":"Creation of new instance of type '#{type}' is not supported","messagePattern":"Creation of new instance of type '#(.+?)' is not supported","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/types/types.rb","lineNumber":345,"sourceCode":"  #\n  # @return [Function] the created function\n  # @raises ArgumentError\n  #\n  def new_function\n    self.class.new_function(self)\n  end\n\n  # This default implementation of of a new_function raises an Argument Error.\n  # Types for which creating a new instance is supported, should create and return\n  # a Puppet Function class by using Puppet:Loaders.create_loaded_function(:new, loader)\n  # and return that result.\n  #\n  # @param type [PAnyType] the type to create a new function for\n  # @return [Function] the created function\n  # @raises ArgumentError\n  #\n  def self.new_function(type)\n    raise ArgumentError, \"Creation of new instance of type '#{type}' is not supported\"\n  end\n\n  # Answers the question if instances of this type can represent themselves as a string that\n  # can then be passed to the create method\n  #\n  # @return [Boolean] whether or not the instance has a canonical string representation\n  def roundtrip_with_string?\n    false\n  end\n\n  # The default instance of this type. Each type in the type system has this constant\n  # declared.\n  #\n  DEFAULT = PAnyType.new\n\n  protected\n\n  # @api private","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/types/types.rb#L327-L363","documentation":"Error \"Creation of new instance of type '#{type}' is not supported\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/types/types.rb:345 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"}