Skip to content

class Crystal::NilableCast
inherits Crystal::ASTNode

obj.as?(to)

Class methods

.new(obj : ASTNode, to : ASTNode)

View source

Methods

#==(other : self)

Returns true if this reference is the same as other. Invokes same?.

#accept_children(visitor)

View source

#clone_without_location

View source

#end_location

The location where this node ends, or nil if the location is not known.

View source

#hash(hasher)

#interpret(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)

View source

#non_nilable_type : Type

View source

#non_nilable_type? : Type?

View source

#obj=(obj)

View source

#to=(to)

View source

#upcast=(upcast)

View source

#upcast? : Bool

View source

#update(from = nil)

View source