class Crystal::Macros::Union
inherits Crystal::Macros::ASTNode
¶
A type union, like (Int32 | String).
Methods¶
#resolve : ASTNode
¶
: ASTNode
Resolves this union to a TypeNode. Gives a compile-time error
if any type inside the union can't be resolved.
#resolve? : ASTNode | NilLiteral
¶
: ASTNode | NilLiteral
Resolves this union to a TypeNode. Returns a NilLiteral
if any type inside the union can't be resolved.