class Crystal::Macros::ProcNotation

Overview

The type of a proc or block argument, like String -> Int32.

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance Method Detail

def inputs : ArrayLiteral(ASTNode) #

Returns the argument types, or an empty list if no arguments.


[View source]
def output : ASTNode | NilLiteral #

Returns the output type, or nil if there is no return type.


[View source]
def resolve : ASTNode #

Resolves this proc notation to a TypeNode if it denotes a type, or otherwise gives a compile-time error.


[View source]
def resolve? : ASTNode | NilLiteral #

Resolves this proc notation to a TypeNode if it denotes a type, or otherwise returns a NilLiteral.


[View source]