class Crystal::MetaTypeVar
inherits Crystal::Var
¶
A variable belonging to a type: a global, class or instance variable (globals belong to the program).
Included modules
Crystal::Annotatable
Methods¶
#initializer=(initializer : ClassVarInitializer?)
¶
(initializer : ClassVarInitializer?)
The (optional) initial value of a class variable
#no_init_flag=(no_init_flag)
¶
(no_init_flag)
If true, there's no need to check whether the class var was initialized or not when reading it.
#no_init_flag? : Bool
¶
: Bool
If true, there's no need to check whether the class var was initialized or not when reading it.
#owner=(owner : Type)
¶
(owner : Type)
The owner of this variable, useful for showing good error messages.
#read=(read)
¶
(read)
Was this class_var already read during the codegen phase?
If not, and we are at the place that declares the class var, we can
directly initialize it now, without checking for an init
flag.
#read? : Bool
¶
: Bool
Was this class_var already read during the codegen phase?
If not, and we are at the place that declares the class var, we can
directly initialize it now, without checking for an init
flag.
#simple_initializer=(simple_initializer)
¶
(simple_initializer)
Flag used during codegen to indicate the initializer is simple and doesn't require a call to a function
#simple_initializer? : Bool
¶
: Bool
Flag used during codegen to indicate the initializer is simple and doesn't require a call to a function
#thread_local=(thread_local)
¶
(thread_local)
Is this variable thread local? Only applicable to global and class variables.
#thread_local? : Bool
¶
: Bool
Is this variable thread local? Only applicable to global and class variables.
#uninitialized=(uninitialized)
¶
(uninitialized)
Is this variable "unsafe" (no need to check if it was initialized)?
#uninitialized? : Bool
¶
: Bool
Is this variable "unsafe" (no need to check if it was initialized)?