HTTypeAny class

A type is both top and bottom, only used on declaration for analysis.

There's no runtime value that has any as its type.

In analysis, you can do everything with it:

1, use any operator on it.

2, call it as a function.

3, get a member out of it.

4, get a subscript value out of it.

Every type is assignable to type any (the meaning of top), and type any is assignable to every type (the meaning of bottom).

With any we lose any protection that is normally given to us by static type system.

Therefore, it should only be used as a last resort when we can’t use more specific types or unknown.

Inheritance

Constructors

HTTypeAny(String? id)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
id String?
finalinherited
isBottom bool
This type is assignable to all other types.
finalinherited
isResolved bool
no setterinherited
isTop bool
Every type is assignable to a top type,
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isA(HTType? other) bool
Check wether value of this HTType can be assigned to other HTType.
inherited
isNotA(HTType? other) bool
Wether object of this HTType cannot be assigned to other HTType
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(HTDeclarationNamespace namespace) HTType
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited