Skip to content

module Crystal::GenericType

A non-instantiated generic type, like Array(T), Hash(K, V) or Enumerable(T).

Included modules

Crystal::InstanceVarContainer

Direct including types

Crystal::GenericClassType Crystal::GenericModuleType

Methods

#add_inherited(type)

View source

#add_instance_var_initializer(name, value, meta_vars)

View source

#double_variadic=(double_variadic)

Is it **? Currently only NamedTuple is.

View source

#double_variadic?

Is it **? Currently only NamedTuple is.

View source

#each_instantiated_type

View source

#inherited : Array(Type)?

View source

#instantiate(type_vars)

View source

#instantiated_generic_superclass(instance)

View source

#instantiated_types

Returns an array of all instantiations of this generic type. NamedTupleType overrides this because it doesn't use positional type arguments.

View source

#lookup_path_item(name : String, lookup_in_namespace, include_private, location)

View source

#notify_parents_subclass_added(type)

View source

#run_instance_var_initializer(initializer, instance : GenericClassInstanceType | NonGenericClassType)

View source

#run_instance_var_initializer(initializer, instance)

View source

#run_instance_vars_initializers(real_type, type : GenericClassType | ClassType, instance)

View source

#run_instance_vars_initializers(real_type, type, instance)

View source

#splat_index : Int32?

The index of the * in the type variables.

View source

#splat_index=(splat_index : Int32?)

The index of the * in the type variables.

View source

#type_parameter(name) : TypeParameter

Returns a TypeParameter relative to this type

View source

#type_var?(name)

View source

#type_vars : Array(String)

The type variable names (K and V in Hash).

View source