Skip to content

class Crystal::GenericModuleType
inherits Crystal::ModuleType

A generic module type, like Enumerable(T).

Included modules

Crystal::ClassVarContainer Crystal::GenericType

Class methods

.new(program, namespace, name, type_vars)

View source

Methods

#add_including_type(type)

View source

#add_instance_var_initializer(name, value, meta_vars)

View source

#can_be_stored?

Returns true if this type can be assigned to an instance or class variable, or used in a generic type argument.

As of now, abstract base type such as Object, Reference, Value, Int, and unbound generic types such as Array(T), can't be stored.

View source

#module?

View source

#new_generic_instance(program, generic_type, type_vars)

View source

#raw_including_types : Array(Crystal::Type)?

View source

#to_s_with_options(io : IO, skip_union_parens : Bool = false, generic_args : Bool = true, codegen : Bool = false) : Nil

View source

#type_desc

View source