class Crystal::ClassVarsInitializerVisitor
inherits Crystal::SemanticVisitor
¶
In this pass we gather class var initializers like:
class Foo
@@x = 1
end
The last initializer set for a type is the one that will be used.
Class variables don't have access to outside local variables. This won't compile:
class Foo
a = 1
@@x = a # ERROR
end
Class methods¶
Methods¶
#class_vars : Hash(Crystal::ClassVarContainer, Hash(String, {Crystal::ASTNode, Crystal::ASTNode}))
¶
: Hash(Crystal::ClassVarContainer, Hash(String, {Crystal::ASTNode, Crystal::ASTNode}))