class Crystal::GenericClassType
inherits Crystal::ClassType
¶
A generic class type, like Array(T).
Included modules
Crystal::ClassVarContainer
Crystal::GenericType
Direct known subclasses
Crystal::GenericUnionType
Crystal::NamedTupleType
Crystal::PointerType
Crystal::ProcType
Crystal::StaticArrayType
Crystal::TupleType
Class methods¶
.new(program, namespace, name, superclass, type_vars : Array(String), add_subclass = true)
¶
(program, namespace, name, superclass, type_vars : Array(String), add_subclass = true)
Methods¶
#can_be_stored?
¶
Returns true
if this type can be assigned to an instance or class
variable, or used in a generic type argument.
As of now, abstract base type such as Object, Reference, Value,
Int, and unbound generic types such as Array(T)
, can't be stored.