Method: Puppet::Pops::Types::TypeCalculator#infer_Array

Defined in:
lib/puppet/pops/types/type_calculator.rb

#infer_Array(o) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



667
668
669
670
671
672
673
674
675
676
677
# File 'lib/puppet/pops/types/type_calculator.rb', line 667

def infer_Array(o)
  if o.instance_of?(Array)
    if o.empty?
      PArrayType::EMPTY
    else
      PArrayType.new(infer_and_reduce_type(o), size_as_type(o))
    end
  else
    infer_Object(o)
  end
end