Skip to content

alias Crystal::TypeVar

Any thing that can be passed as a generic type variable.

For example, in:

StaticArray(UInt8, 256)

there are two type vars: UInt8 (the type) and 256 (a number literal).

These are the only things that are currently accepted as type variables, but this is kept as Type | ASTNode to make it easier to add new nodes in the future.

Alias definition

Crystal::ASTNode | Crystal::Type