class Myst::TypeCheck::AnyType
- Myst::TypeCheck::AnyType
- Myst::TypeCheck::Type
- Reference
- Object
Overview
Any is a special type that implies any type would be valid in its place
(including Nil), but the entity should not be considered as something
generic, like Object.
For the most part, Any is used as placeholders for untyped method
parameters and instance variables.
Defined in:
typecheck/type.crConstructors
Instance Method Summary
-
#exclude(other : Type)
It also cannot exclude Any types, because the set of remaining types is non-determinable.
-
#includes?(other : Type)
Similarly,
Anyinherently includes any and all types. -
#union_with(other : Type)
Since Any represents the ability to be any type, a union with
Anyis meaningless, and should be avoided so thatAnycan always be checked directly.
Instance methods inherited from class Myst::TypeCheck::Type
==(other : self)
==,
ancestors
ancestors,
exclude(other : Type)
exclude,
hash(hasher)
hash,
id : UInt64
id,
id=(id : UInt64)
id=,
includes?(other : Type)
includes?,
instance_type
instance_type,
instance_type=(instance_type : Type | Nil)
instance_type=,
instance_type? : Type | Nil | Nil
instance_type?,
instantiable?
instantiable?,
name : String
name,
name=(name : String)
name=,
scope : Scope
scope,
scope=(scope : Scope)
scope=,
static_type
static_type,
static_type=(static_type : Type | Nil)
static_type=,
static_type? : Type | Nil | Nil
static_type?,
super_type : Type | Nil
super_type,
super_type=(super_type : Type | Nil)
super_type=,
super_type? : Type | Nil | Nil
super_type?,
to_s(io : IO)
to_s,
union_with(other : Type)union_with(other : UnionType) union_with
Constructor methods inherited from class Myst::TypeCheck::Type
new(name : String, id : UInt64 = @@next_id, *, static_type : Myst::TypeCheck::Type | Nil = nil, instance_type : Myst::TypeCheck::Type | Nil = nil, super_type : Myst::TypeCheck::Type | Nil = nil)
new
Constructor Detail
Instance Method Detail
It also cannot exclude Any types, because the set of remaining types is non-determinable.
Since Any represents the ability to be any type, a union with Any is
meaningless, and should be avoided so that Any can always be checked
directly.