Sha256: 27e2fbdefc3d8e5d9d9d9cb383dde48aca90236bf156344e72c26975ed98434e

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

module Steep
  module AST
    module Types
      class Void
        attr_reader :location

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

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

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "void"
        end

        def free_variables
          Set.new
        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/void.rb
steep-0.2.0 lib/steep/ast/types/void.rb
steep-0.1.0 lib/steep/ast/types/void.rb