Skip to content

class Crystal::Generic
inherits Crystal::ASTNode

Class methods

.new(name, type_vars : Array, named_args = nil)

View source

.new(name, type_var : 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

#hash(hasher)

#in_type_args=(in_type_args)

View source

#in_type_args? : Bool

View source

#instance_type : GenericType

#instance_type=(instance_type : GenericType)

View source

#instance_type? : GenericType?

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

View source

#name : ASTNode

Usually a Path, but can also be a TypeNode in the case of a custom array/hash-like literal.

View source

#name=(name : ASTNode)

Usually a Path, but can also be a TypeNode in the case of a custom array/hash-like literal.

View source

#named_args : Array(NamedArgument)?

View source

#named_args=(named_args : Array(NamedArgument)?)

View source

#question=(question)

true if this Generic was parsed from T?

View source

#question? : Bool

true if this Generic was parsed from T?

View source

#restriction_of?(other : Path, owner, strict = false)

View source

#restriction_of?(other : Generic, owner, strict = false)

View source

#scope : Type?

View source

#scope=(scope : Type?)

View source

#type_vars : Array(ASTNode)

View source

#type_vars=(type_vars : Array(ASTNode))

View source

#update(from = nil)

View source