module Steep module TypeInference class Context class MethodContext attr_reader name: Symbol? attr_reader method: RBS::Definition::Method? attr_reader method_type: Interface::MethodType? attr_reader return_type: AST::Types::t attr_reader constructor: bool attr_reader super_method: RBS::Definition::Method? def initialize: ( name: Symbol, method: RBS::Definition::Method?, method_type: Interface::MethodType?, return_type: AST::Types::t, constructor: bool, super_method: RBS::Definition::Method? ) -> void def block_type: () -> Interface::Block? end class BlockContext # The type of block itself # # Returns `nil` if no type is specified. # attr_reader body_type: AST::Types::t? def initialize: (body_type: AST::Types::t?) -> void def subst: (Interface::Substitution) -> BlockContext end class BreakContext # Type of arguments to `break` statement # attr_reader break_type: AST::Types::t # Type of arguments to `next` statement # # `nil` means the passed value will be ignored. # attr_reader next_type: AST::Types::t? def initialize: (break_type: AST::Types::t, next_type: AST::Types::t?) -> void def subst: (Interface::Substitution) -> BreakContext end class ModuleContext attr_reader instance_type: AST::Types::t attr_reader module_type: AST::Types::t attr_reader defined_instance_methods: untyped attr_reader defined_module_methods: untyped attr_reader nesting: RBS::Resolver::context attr_reader implement_name: untyped attr_reader class_name: RBS::TypeName attr_reader instance_definition: RBS::Definition? attr_reader module_definition: RBS::Definition? @class_variables: Hash[Symbol, RBS::Types::t]? def initialize: ( instance_type: AST::Types::t, module_type: AST::Types::t, implement_name: untyped, class_name: RBS::TypeName, nesting: RBS::Resolver::context, ?instance_definition: RBS::Definition?, ?module_definition: RBS::Definition? ) -> void def class_variables: () -> Hash[Symbol, RBS::Types::t]? def update: ( ?instance_type: AST::Types::t, ?module_type: AST::Types::t, ?implement_name: untyped, ?class_name: RBS::TypeName, ?instance_definition: RBS::Definition?, ?module_definition: RBS::Definition?, ?nesting: RBS::Resolver::context ) -> ModuleContext end class TypeVariableContext attr_reader table: Hash[Symbol, Interface::TypeParam] attr_reader type_params: Array[Interface::TypeParam] def initialize: (Array[Interface::TypeParam] type_params, ?parent_context: TypeVariableContext?) -> void def []: (Symbol name) -> AST::Types::t? def upper_bounds: () -> Hash[Symbol, AST::Types::t] def self.empty: () -> TypeVariableContext end attr_reader call_context: untyped attr_reader method_context: untyped # BlockContext for current execution point # # `nil` when not in iterator block. # attr_reader block_context: BlockContext? attr_reader break_context: BreakContext? attr_reader module_context: ModuleContext? attr_reader self_type: AST::Types::t attr_reader type_env: TypeEnv attr_reader variable_context: TypeVariableContext def initialize: ( method_context: untyped, block_context: BlockContext?, break_context: BreakContext?, module_context: ModuleContext?, self_type: untyped, type_env: TypeEnv, call_context: untyped, variable_context: TypeVariableContext ) -> void def with: ( ?method_context: untyped, ?block_context: BlockContext?, ?break_context: BreakContext?, ?module_context: ModuleContext?, ?self_type: untyped, ?type_env: TypeEnv, ?call_context: untyped, ?variable_context: untyped ) -> Context def factory: () -> AST::Types::Factory def env: () -> RBS::Environment end end end