class

Crystal::Macros::Union

Inherits Crystal::Macros::ASTNode

A type union, like (Int32 | String).

Instance methods

resolve

Resolves this union to a TypeNode. Gives a compile-time error if any type inside the union can't be resolved.

Source
resolve?

Resolves this union to a TypeNode. Returns a NilLiteral if any type inside the union can't be resolved.

Source
types

Returns the types of this union.

Source