abstract class Savi::Compiler::TInfer::Info

Direct Known Subclasses

Defined in:

savi/compiler/t_infer/info.cr

Instance Method Summary

Instance Method Detail

abstract def add_downstream(use_pos : Source::Pos, info : Info) #

[View source]
def add_peer_hint(peer : Info) #

Most Info types ignore hints, but a few override this method to see them, or to pass them along to other nodes that may wish to see them.


[View source]
def as_conduit? : Conduit | Nil #

[View source]
def as_downstream_constraint_meta_type(ctx : Context, type_check : TTypeCheck::ForReifiedFunc) : MetaType | Nil #

In the rare case that an Info subclass needs to dynamically pretend to be a different downstream constraint, it can override this method. If you need to report multiple positions, also override the other method below called as_multiple_downstream_constraints. This will prevent upstream DynamicInfos from eagerly resolving you.


[View source]
def as_multiple_downstream_constraints(ctx : Context, type_check : TTypeCheck::ForReifiedFunc) : Array(Tuple(Source::Pos, MetaType)) | Nil #

In the rare case that an Info subclass needs to dynamically pretend to be multiple different downstream constraints, it can override this method. This is only used to report positions in more detail, and it is expected that the intersection of all MetaTypes here is the same as the resolve.


[View source]
def as_upstream_conduits : Array(Conduit) #

[View source]
def layer_index : Int32 #

def layer_index=(layer_index : Int32) #

[View source]
def layer_index? : Int32 | Nil #

def override_describe_kind : String | Nil #

[View source]
def override_describe_kind=(override_describe_kind : String | Nil) #

[View source]
def pos : Source::Pos #

[View source]
def pos=(pos : Source::Pos) #

[View source]
def resolve_span!(ctx : Context, infer : Visitor) #

[View source]
def tether_resolve_span(ctx : Context, infer : Visitor) #

[View source]
def tether_terminal? #

[View source]
def tether_upward_transform_span(ctx : Context, infer : Visitor, span : Span) : Span #

[View source]
abstract def tethers(querent : Info) : Array(Tether) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]