Skip to content
Crystal
Error
Initializing search
GitHub
Home
Specification
Guides
Tutorials
API
Compiler
Crystal
GitHub
Home
Specification
Specification
About this guide
Comments
Documenting code
Literals
Literals
Nil
Bool
Integers
Floats
Char
String
Symbol
Array
Hash
Range
Regex
Tuple
NamedTuple
Proc
Command
Assignment
Local variables
Control expressions
Control expressions
Truthy and falsey values
if
if
As a suffix
As an expression
Ternary if
if var
if var.is_a?(...)
if var.responds_to?(...)
if var.nil?
if !
unless
case
while
while
break
next
until
&&
||
Requiring files
Types and methods
Types and methods
Everything is an object
The Program
Classes and methods
Classes and methods
new, initialize and allocate
Methods and instance variables
Type inference
Union types
Overloading
Default parameter values and named arguments
Splats and tuples
Type restrictions
Return types
Method arguments
Operators
Visibility
Inheritance
Inheritance
Virtual and abstract types
Class methods
Class variables
finalize
Modules
Generics
Structs
Constants
Enums
Blocks and Procs
Blocks and Procs
Capturing blocks
Proc literal
Block forwarding
Closures
alias
Exception handling
Type grammar
Type reflection
Type reflection
is_a?
nil?
responds_to?
as
as?
typeof
Macros
Macros
Macro methods
Hooks
Fresh variables
Annotations
Annotations
Built-in annotations
Low-level primitives
Low-level primitives
pointerof
sizeof
instance_sizeof
offsetof
Uninitialized variable declaration
Compile-time flags
Compile-time flags
Cross-compilation
C bindings
C bindings
lib
fun
fun
out
to_unsafe
struct
union
enum
Variables
Constants
type
alias
Callbacks
Unsafe code
Guides
Tutorials
Tutorials
Basics
Basics
Hello World
Variables
Math
Strings
Control Flow
Methods
API
Compiler
Compiler
ASTNode
ASTNode
Alias
Annotation
AnnotationDef
Arg
ArrayLiteral
Asm
AsmOperand
Assign
AssignWithRestriction
BinaryOp
BinaryOp
And
Or
Block
BoolLiteral
CStructOrUnionDef
Call
Call
RetryLookupWithLiterals
Case
Cast
CharLiteral
ClassDef
ClassVar
ControlExpression
ControlExpression
Break
Next
Return
Def
Def
External
EnumDef
ExceptionHandler
Expressions
Extend
ExternalVar
FileNode
FunDef
Generic
Global
HashLiteral
HashLiteral
Entry
If
ImplicitObj
Include
InstanceVar
IsA
LibDef
Macro
MacroExpression
MacroFor
MacroId
MacroIf
MacroLiteral
MacroVar
MagicConstant
MetaMacroVar
MetaVar
Metaclass
ModuleDef
MultiAssign
NamedArgument
NamedTupleLiteral
NamedTupleLiteral
Entry
NilLiteral
NilableCast
Nop
NumberLiteral
OffsetOf
OpAssign
Path
Primitive
Primitive
TupleIndexer
ProcLiteral
ProcNotation
ProcPointer
RangeLiteral
ReadInstanceVar
RegexLiteral
Require
Rescue
RespondsTo
Select
Select
When
Self
StringInterpolation
StringLiteral
SymbolLiteral
TupleLiteral
TypeDeclaration
TypeDef
TypeFilteredNode
TypeNode
TypeOf
UnaryExpression
UnaryExpression
DoubleSplat
InstanceSizeOf
MacroVerbatim
Not
Out
PointerOf
SizeOf
Splat
Underscore
UninitializedVar
Union
Unless
Unreachable
Until
Var
Var
MetaTypeVar
VisibilityModifier
When
While
Yield
YieldBlockBinder
AbstractDefChecker
AbstractDefChecker
ReplacePathWithTypeVar
Annotatable
CacheDir
CallSignature
ClassVarContainer
ClassVarInitializer
Codegen
Codegen
Target
Target
Error
Command
Command
CompilerConfig
FormatCommand
Compiler
Compiler
CompilationUnit
EmitTarget
Result
Source
Config
ContextResult
Conversions
Cover
CrystalLLVMBuilder
CrystalLibraryPath
CrystalPath
CrystalPath
NotFoundError
Debug
DefInstanceContainer
DefInstanceKey
DefWithMetadata
DeprecatedAnnotation
Doc
Doc
Constant
Generator
HeadTemplate
Highlighter
Item
JsNavigatorTemplate
JsSearchTemplate
JsTypeTemplate
JsUsageModal
JsVersionsTemplate
ListItemsTemplate
Macro
Main
MainTemplate
Markdown
Markdown
DocRenderer
HTMLRenderer
Parser
Parser
CodeFence
PrefixHeader
UnorderedList
Renderer
Method
MethodDetailTemplate
MethodSummaryTemplate
MethodsInheritedTemplate
OtherTypesTemplate
ProjectInfo
RelativeLocation
SidebarTemplate
SitemapTemplate
StyleTemplate
Type
TypeTemplate
Error
Error
CodeError
CodeError
MethodTraceException
SyntaxException
TypeException
TypeException
FrozenTypeException
MacroRaiseException
UndefinedMacroMethodError
ErrorFormat
ExhaustivenessChecker
ExhaustivenessChecker
BoolPattern
BoolTarget
EnumMemberNamePattern
EnumMemberPattern
EnumTarget
Pattern
Target
TypePattern
TypeTarget
UnderscorePattern
ExpandResult
ExpandResult
Expansion
Expansion
MacroImplementation
ExpandableNode
ExperimentalAnnotation
GenericType
Git
HashStringType
HierarchyPrinter
HierarchyPrinter
JSONHierarchyPrinter
Hook
HookExpansionsContainer
ImplementationResult
ImplementationTrace
Init
Init
Config
EditorconfigView
Error
FilesConflictError
GitInitView
GitignoreView
InitProject
LicenseView
ReadmeView
ShardView
SpecExampleView
SpecHelperView
SrcExampleView
TravisView
View
InstanceVarContainer
InstanceVarInitializerContainer
InstanceVarInitializerContainer
InstanceVarInitializer
LLVMBuilderHelper
LLVMId
LLVMTyper
LLVMTyper
TypeCache
Lexer
Lexer
HeredocItem
LocPopPragma
LocPragma
LocPushPragma
LocSetPragma
Parser
Parser
ArgExtras
CallArgs
ParseMode
Piece
Unclosed
LinkAnnotation
LiteralExpander
Location
Match
MatchContext
Matches
MathInterpreter
MetaVars
MultiType
NamedArgumentType
NilReason
Playground
Playground
Agent
AgentInstrumentorTransformer
AgentInstrumentorTransformer
FirstBlockVisitor
MacroDefNameCollector
TypeBodyTransformer
EnvironmentHandler
Error
FileContentPage
PageHandler
PathStaticFileHandler
PathWebSocketHandler
PlaygroundPage
PlaygroundPage
Resource
Server
Session
WorkbookHandler
WorkbookIndexPage
WorkbookIndexPage
Item
PrettyTypeNameJsonConverter
ProgressTracker
RecursiveStructChecker
SkipMacroException
SpecialVar
SubclassObservable
TablePrint
TablePrint
Cell
Column
RowTypes
Separator
Token
Token
DelimiterState
MacroState
Transformer
Transformer
CleanupTransformer
CleanupTransformer
ClosuredVarsCollector
ExpandTransformer
Normalizer
Type
Type
DefInMacroLookup
GenericClassInstanceMetaclassType
GenericInstanceType
GenericInstanceType
GenericClassInstanceType
GenericClassInstanceType
NamedTupleInstanceType
PointerInstanceType
ProcInstanceType
StaticArrayInstanceType
TupleInstanceType
TupleInstanceType
Index
GenericModuleInstanceType
GenericModuleInstanceMetaclassType
LiteralType
LiteralType
NumberLiteralType
SymbolLiteralType
NamedType
NamedType
AliasType
AnnotationType
Const
ModuleType
ModuleType
ClassType
ClassType
GenericClassType
GenericClassType
GenericUnionType
NamedTupleType
PointerType
ProcType
StaticArrayType
TupleType
MetaclassType
NonGenericClassType
PrimitiveType
PrimitiveType
BoolType
CharType
FloatType
IntegerType
NilType
SymbolType
EnumType
GenericModuleType
LibType
NonGenericModuleType
NonGenericModuleType
FileModule
Program
Program
FinishedHook
RecordedRequire
NoReturnType
TypeDefType
VoidType
TypeParameter
TypeSplat
UnionType
UnionType
MixedUnionType
NilableProcType
NilableReferenceUnionType
NilableType
ReferenceUnionType
VirtualMetaclassType
VirtualType
TypeDeclarationProcessor
TypeDeclarationProcessor
Error
InitializeInfo
InstanceVarTypeInfo
NilableInstanceVar
TypeDeclarationWithLocation
TypeFilter
TypeFilter
AndTypeFilter
NoReturnFilter
NotFilter
OrTypeFilter
RespondsToTypeFilter
SimpleTypeFilter
TruthyFilter
TypeFilters
TypeVar
TypedDefProcessor
VirtualFile
VirtualTypeLookup
VirtualTypeLookup
Change
Visibility
Visitor
Visitor
CodeGenVisitor
CodeGenVisitor
CodegenWellKnownFunctions
Context
FunMetadata
Handler
LLVMVar
LLVMVars
ModuleInfo
Phi
StringKey
ContextVisitor
ExpandVisitor
FixMissingTypes
Formatter
Formatter
AlignInfo
CommentInfo
HeredocFix
HeredocInfo
HasSelfVisitor
ImplementationsVisitor
PrintTypesVisitor
RechableVisitor
ReturnGatherer
SemanticVisitor
SemanticVisitor
ClassVarsInitializerVisitor
InstanceVarsInitializerVisitor
InstanceVarsInitializerVisitor
Initializer
MainVisitor
MainVisitor
InstanceVarsCollector
PropagateDocVisitor
TopLevelVisitor
TopLevelVisitor
FinishedHook
TypeDeclarationVisitor
TypeDeclarationVisitor
TypeDeclarationWithLocation
TypeGuessVisitor
TypeGuessVisitor
Error
InitializeInfo
InstanceVarTypeInfo
TypeDeclarationWithLocation
TypeInfo
ToSVisitor
Warnings
class
Crystal::Playground::Error
inherits
Crystal::Error
¶