Sha256: 7f65b9341c23f047833c6bf4d912340a873ebaad94a11a9e960eb2211d025932

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

module Steep
  module AST
    module Types
      class Class
        attr_reader :location

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

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

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          s.module_type or raise "Unexpected substitution: #{inspect}"
        end

        def free_variables
          Set.new
        end

        def level
          [0]
        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/class.rb
steep-0.2.0 lib/steep/ast/types/class.rb
steep-0.1.0 lib/steep/ast/types/class.rb