Sha256: e8ed7a514517ed6d771cb96701d92514bfd400167438db95cb9cc2eb5f1514a2

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

module Steep
  module AST
    module Types
      class Any
        attr_reader :location

        def initialize(location: nil)
          @location = location
        end

        def ==(other)
          other.is_a?(Any)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "any"
        end

        def free_variables
          Set.new
        end

        def level
          [1]
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
steep-0.3.0 lib/steep/ast/types/any.rb
steep-0.2.0 lib/steep/ast/types/any.rb
steep-0.1.0 lib/steep/ast/types/any.rb