Sha256: c9c9481fc26f7af6699caa54f2c099b897f2a86a3fdcf1a0166d93e5da4e2732

Contents?: true

Size: 621 Bytes

Versions: 10

Compression:

Stored size: 621 Bytes

Contents

module Steep
  module AST
    module Types
      class Nil
        extend SharedInstance
        
        def ==(other)
          other.is_a?(Nil)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "nil"
        end

        include Helper::NoFreeVariables

        include Helper::NoChild

        def level
          [0]
        end

        def back_type
          Name::Instance.new(name: Builtin::NilClass.module_name,
                             args: [])
        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/nil.rb
steep-1.9.0 lib/steep/ast/types/nil.rb
steep-1.9.0.dev.2 lib/steep/ast/types/nil.rb
steep-1.9.0.dev.1 lib/steep/ast/types/nil.rb
steep-1.8.3 lib/steep/ast/types/nil.rb
steep-1.8.2 lib/steep/ast/types/nil.rb
steep-1.8.1 lib/steep/ast/types/nil.rb
steep-1.8.0 lib/steep/ast/types/nil.rb
steep-1.8.0.pre.2 lib/steep/ast/types/nil.rb
steep-1.8.0.pre.1 lib/steep/ast/types/nil.rb