Sha256: 7d6016b52d671536673ceac5b0734bed86f19b0efda8900d8dac8d0f5734e46a

Contents?: true

Size: 1.88 KB

Versions: 1

Compression:

Stored size: 1.88 KB

Contents

module Steep
  module AST
    module Types
      module Logic
        type loc = RBS::Location[untyped, untyped]

        class Base
          attr_reader location: untyped

          def subst: (untyped s) -> self

          def free_variables: () -> untyped

          include Helper::NoChild

          def hash: () -> untyped

          def ==: (untyped other) -> untyped

          alias eql? ==

          def to_s: () -> ::String

          def level: () -> Array[Integer]
        end

        # A type for `!` (not) operator results.
        class Not < Base
          def initialize: (?location: untyped?) -> void
        end

        # A type for `foo.nil?` call results.
        class ReceiverIsNil < Base
          def initialize: (?location: untyped?) -> void
        end

        #
        class ReceiverIsNotNil < Base
          def initialize: (?location: untyped?) -> void
        end

        # A type for `receiver.is_a?(C)` call results.
        class ReceiverIsArg < Base
          def initialize: (?location: untyped?) -> void
        end

        # A type for `Class#===` call results.
        class ArgIsReceiver < Base
          def initialize: (?location: untyped?) -> void
        end

        # A type for `Object#===` call results.
        class ArgEqualsReceiver < Base
          def initialize: (?location: untyped?) -> void
        end

        # A type with truthy/falsy type environment.
        class Env < Base
          attr_reader truthy: TypeInference::TypeEnv

          attr_reader falsy: TypeInference::TypeEnv

          attr_reader type: t

          def initialize: (truthy: TypeInference::TypeEnv, falsy: TypeInference::TypeEnv, type: t, ?location: loc?) -> void

          def ==: (untyped other) -> bool

          alias eql? ==

          def hash: () -> Integer

          def inspect: () -> ::String

          alias to_s inspect
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
steep-1.3.0.pre.2 sig/steep/ast/types/logic.rbs