A generic instantiation, like Foo(T) or Foo::Bar::Baz(T)
Returns the path to the generic.
Returns the named arguments of this instantiation, if any.
Resolves this generic to a TypeNode if it denotes a type, or otherwise gives a compile-time error.
Resolves this path to a TypeNode if it denotes a type, or otherwise returns a NilLiteral.
Returns the arguments (the type variables) of this instantiation.
Returns this generic inside an array literal.
Crystal::Macros::ASTNode
Returns the named arguments of this instantiation, if any.
Resolves this generic to a TypeNode if it denotes a type, or otherwise gives a compile-time error.
Resolves this path to a TypeNode if it denotes a type, or otherwise returns a NilLiteral.
Returns the arguments (the type variables) of this instantiation.
Returns this generic inside an array literal. This method exists so you can call #types on the type of a type declaration and get all types, whether it's a Generic, Path or Union.
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Crystal/Macros/Generic.html