View source code
Display the source code in dmd/mtype.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Class dmd.mtype.TypeEnum

class TypeEnum
  : Type ;

Methods

NameDescription
accept (v) Visits this AST node using the given visitor.
addSTC (stc) Apply STCxxxx bits to existing type. Use *before* semantic analysis is run.
alignment () Return alignment to use for this type.
baseElemOf () If this is a type of static array, return its base element type.
check () Look for bugs in constructing types.
constConv (to) Determine if converting 'this' to 'to' is an identity operation, a conversion to const operation, or the types aren't the same.
deduceWild (t, isRef) Compute MOD bits matching this argument type to wild parameter type.
defaultInitLiteral (loc) Use when we prefer the default initializer to be a literal, rather than a global immutable variable.
deinitialize () Deinitializes the global state of the compiler.
factory (classname) Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor.
fixTo (t) For our new type 'this', which is type-constructed from t, fill in the cto, ito, sto, scto, wto shortcuts.
getUniqueID () Returns a non-zero unique ID for this Type, or returns 0 if the Type does not (yet) have a unique ID. If semantic() has not been run, 0 is returned.
hasInvariant ()
hasSystemFields () Detect if this is an unsafe type because of the presence of @system members
hasVoidInitPointers () Detect if type has pointer fields that are initialized to void. Local stack variables with such void fields can remain uninitialized, leading to pointer bugs.
hasWild () Return !=0 if the type or any of its subtypes is wild.
implicitConvTo (to) Determine if 'this' can be implicitly converted to type 'to'.
isAssignable () When T is mutable,
isBoolean () Returns true if T can be converted to boolean value.
isFunction_Delegate_PtrToFunction () Is this type a function, delegate, or pointer to a function?
isPtrToFunction () Is this type a pointer to a function?
modToBuffer (buf) Store this type's modifier name into buf.
modToChars () Return this type's modifier name.
needsCopyOrPostblit () true if when type is copied, it needs a copy constructor or postblit applied. Only applies to value types, not ref types.
needsDestruction () true if when type goes out of scope, it needs a destructor applied. Only applies to value types, not ref types.
needsNested ()
nextOf () If this is a type of something, return that something.
nullAttributes () Return a copy of this type with all attributes null-initialized. Useful for creating a type with different modifiers.
numberOfElems (loc) Compute number of elements for a (possibly multidimensional) static array, or 1 for other types.
opCmp (o) Compare with another Object obj.
opEquals (o) Test whether this is equal to o. The default implementation only compares by identity (using the is operator). Generally, overrides and overloads for opEquals should attempt to compare objects by their contents. A class will most likely want to add an overload that takes your specific type as the argument and does the content comparison. Then you can override this and forward it to your specific typed overload with a cast. Remember to check for null on the typed overload.
sizemask () Return the mask that an integral type will fit into.
toBasetype () If this is a shell around another type, get that other type.
toChars () For pretty-printing a type.
toHash () Compute hash function for Object.
toPrettyChars (QualifyTypes) For pretty-printing a type.
toString ()
toString () Convert Object to a human readable string.

Authors

Walter Bright

License

Boost License 1.0