Skip to content

class Crystal::TypeDeclaration
inherits Crystal::ASTNode

Class methods

.new(var, declared_type, value = nil)

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

#declared_type : ASTNode

View source

#declared_type=(declared_type : ASTNode)

View source

#discarded=(discarded)

Whether a class variable assignment needs to be skipped because it was replaced with another initializer

class Foo
  @@x : Int32 = 1 # This will never execute
  @@x : Int32 = 2
end
View source

#discarded? : Bool

Whether a class variable assignment needs to be skipped because it was replaced with another initializer

class Foo
  @@x : Int32 = 1 # This will never execute
  @@x : Int32 = 2
end
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

#name_size

View source

#value=(value : ASTNode?)

View source

#var=(var : ASTNode)

View source