class Crystal::MetaclassType
inherits Crystal::ClassType
¶
A metaclass type, that results from invoking .class on a type.
For example String.class is the metaclass of String, and it's
the type of String (the type of "foo" is String, the type of
String is String.class).
This metaclass represents only the metaclass of non-generic types.
Included modules
Crystal::ClassVarContainer
Class methods¶
Methods¶
#class_var_owner
¶
Returns the type that owns class vars for a type.
This method returns self, but subclasses might override. For example, a metaclass' class_var_owner is the instance type.
#common_ancestor(other : MetaclassType | VirtualMetaclassType | GenericClassInstanceMetaclassType)
¶
(other : MetaclassType | VirtualMetaclassType | GenericClassInstanceMetaclassType)
#replace_type_parameters(instance)
¶
(instance)
Replace type parameters in this type with the type parameters of the given instance type.