Sha256: 27e9f60cee7f10615b785b24e5dc3fc29825563a613dd06ed1844d7767fa32b0

Contents?: true

Size: 601 Bytes

Versions: 10

Compression:

Stored size: 601 Bytes

Contents

module Steep
  module AST
    module Types
      class Self
        extend SharedInstance

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

        def hash
          self.class.hash
        end

        alias eql? ==

        def to_s
          "self"
        end

        include Helper::NoChild

        def subst(s)
          if s.self_type
            s.self_type
          else
            self
          end
        end

        @@fvs = Set[instance]

        def free_variables
          @@fvs
        end

        def level
          [0]
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
steep-1.9.1 lib/steep/ast/types/self.rb
steep-1.9.0 lib/steep/ast/types/self.rb
steep-1.9.0.dev.2 lib/steep/ast/types/self.rb
steep-1.9.0.dev.1 lib/steep/ast/types/self.rb
steep-1.8.3 lib/steep/ast/types/self.rb
steep-1.8.2 lib/steep/ast/types/self.rb
steep-1.8.1 lib/steep/ast/types/self.rb
steep-1.8.0 lib/steep/ast/types/self.rb
steep-1.8.0.pre.2 lib/steep/ast/types/self.rb
steep-1.8.0.pre.1 lib/steep/ast/types/self.rb