Type

extern (C++) abstract
class Type : ASTNode {}

Constructors

this
this(TY ty)
Undocumented in source.

Members

Functions

accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
addMod
Type addMod(MOD mod)

Add MODxxxx bits to existing type. We're adding, not replacing, so adding const to a shared type => "shared const"

addSTC
Type addSTC(StorageClass stc)

Apply STCxxxx bits to existing type. Use *before* semantic analysis is run.

addStorageClass
Type addStorageClass(StorageClass stc)

Add storage class modifiers to type.

aliasthisOf
Type aliasthisOf()
Undocumented in source. Be warned that the author may not have intended to support it.
alignment
structalign_t alignment()

Return alignment to use for this type.

alignsize
uint alignsize()
Undocumented in source. Be warned that the author may not have intended to support it.
arrayOf
Type arrayOf()
Undocumented in source. Be warned that the author may not have intended to support it.
baseElemOf
Type baseElemOf()

If this is a type of static array, return its base element type.

castMod
Type castMod(MOD mod)

Apply MODxxxx bits to existing type.

check
void check()

Look for bugs in constructing types.

checkAliasThisRec
bool checkAliasThisRec()
Undocumented in source. Be warned that the author may not have intended to support it.
checkComplexTransition
bool checkComplexTransition(Loc loc, Scope* sc)

https://issues.dlang.org/show_bug.cgi?id=14488

Check if the inner most base type is complex or imaginary. Should only give alerts when set to emit transitional messages.

checkDeprecated
void checkDeprecated(Loc loc, Scope* sc)

Check type to see if it is based on a deprecated symbol.

constConv
MATCH constConv(Type to)

Determine if converting 'this' to 'to' is an identity operation, a conversion to const operation, or the types aren't the same.

constOf
Type constOf()

Convert to 'const'.

copy
Type copy()
Undocumented in source. Be warned that the author may not have intended to support it.
covariant
int covariant(Type t, StorageClass* pstc)

Covariant means that 'this' can substitute for 't', i.e. a pure function is a match for an impure type.

deduceWild
MOD deduceWild(Type t, bool isRef)

Compute MOD bits matching this argument type to wild parameter type.

defaultInitLiteral
Expression defaultInitLiteral(Loc loc)

Use when we prefer the default initializer to be a literal, rather than a global immutable variable.

dyncast
DYNCAST dyncast()
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(RootObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
equivalent
bool equivalent(Type t)
Undocumented in source. Be warned that the author may not have intended to support it.
fixTo
void fixTo(Type t)

For our new type 'this', which is type-constructed from t, fill in the cto, ito, sto, scto, wto shortcuts.

getMcache
Mcache* getMcache()
Undocumented in source. Be warned that the author may not have intended to support it.
getTypeInfoIdent
Identifier getTypeInfoIdent()
Undocumented in source. Be warned that the author may not have intended to support it.
hasDeprecatedAliasThis
bool hasDeprecatedAliasThis()
Undocumented in source. Be warned that the author may not have intended to support it.
hasPointers
bool hasPointers()

Return !=0 if type has pointers that need to be scanned by the GC during a collection cycle.

hasVoidInitPointers
bool 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
int hasWild()

Return !=0 if the type or any of its subtypes is wild.

immutableOf
Type immutableOf()

Convert to 'immutable'.

implicitConvTo
MATCH implicitConvTo(Type to)

Determine if 'this' can be implicitly converted to type 'to'.

isAssignable
bool isAssignable()

When T is mutable, Given: T a, b; Can we bitwise assign: a = b; ?

isBaseOf
bool isBaseOf(Type t, int* poffset)
Undocumented in source. Be warned that the author may not have intended to support it.
isBoolean
bool isBoolean()

Returns true if T can be converted to boolean value.

isClassHandle
inout(ClassDeclaration) isClassHandle()
Undocumented in source. Be warned that the author may not have intended to support it.
isConst
bool isConst()
Undocumented in source. Be warned that the author may not have intended to support it.
isImmutable
bool isImmutable()
Undocumented in source. Be warned that the author may not have intended to support it.
isMutable
bool isMutable()
Undocumented in source. Be warned that the author may not have intended to support it.
isNaked
bool isNaked()
Undocumented in source. Be warned that the author may not have intended to support it.
isShared
bool isShared()
Undocumented in source. Be warned that the author may not have intended to support it.
isSharedConst
bool isSharedConst()
Undocumented in source. Be warned that the author may not have intended to support it.
isSharedWild
bool isSharedWild()
Undocumented in source. Be warned that the author may not have intended to support it.
isString
bool isString()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeAArray
inout(TypeAArray) isTypeAArray()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeBasic
TypeBasic isTypeBasic()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeClass
inout(TypeClass) isTypeClass()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeDArray
inout(TypeDArray) isTypeDArray()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeDelegate
inout(TypeDelegate) isTypeDelegate()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeEnum
inout(TypeEnum) isTypeEnum()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeError
inout(TypeError) isTypeError()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeFunction
inout(TypeFunction) isTypeFunction()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeIdentifier
inout(TypeIdentifier) isTypeIdentifier()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeInstance
inout(TypeInstance) isTypeInstance()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeMixin
inout(TypeMixin) isTypeMixin()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeNoreturn
inout(TypeNoreturn) isTypeNoreturn()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeNull
inout(TypeNull) isTypeNull()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypePointer
inout(TypePointer) isTypePointer()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeReference
inout(TypeReference) isTypeReference()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeReturn
inout(TypeReturn) isTypeReturn()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeSArray
inout(TypeSArray) isTypeSArray()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeSlice
inout(TypeSlice) isTypeSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeStruct
inout(TypeStruct) isTypeStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeTraits
inout(TypeTraits) isTypeTraits()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeTuple
inout(TypeTuple) isTypeTuple()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeTypeof
inout(TypeTypeof) isTypeTypeof()
Undocumented in source. Be warned that the author may not have intended to support it.
isTypeVector
inout(TypeVector) isTypeVector()
Undocumented in source. Be warned that the author may not have intended to support it.
isWild
bool isWild()
Undocumented in source. Be warned that the author may not have intended to support it.
isWildConst
bool isWildConst()
Undocumented in source. Be warned that the author may not have intended to support it.
isZeroInit
bool isZeroInit(Loc loc)
Undocumented in source. Be warned that the author may not have intended to support it.
iscomplex
bool iscomplex()
Undocumented in source. Be warned that the author may not have intended to support it.
isfloating
bool isfloating()
Undocumented in source. Be warned that the author may not have intended to support it.
isimaginary
bool isimaginary()
Undocumented in source. Be warned that the author may not have intended to support it.
isintegral
bool isintegral()
Undocumented in source. Be warned that the author may not have intended to support it.
isreal
bool isreal()
Undocumented in source. Be warned that the author may not have intended to support it.
isscalar
bool isscalar()
Undocumented in source. Be warned that the author may not have intended to support it.
isscope
bool isscope()
Undocumented in source. Be warned that the author may not have intended to support it.
isunsigned
bool isunsigned()
Undocumented in source. Be warned that the author may not have intended to support it.
kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
makeConst
Type makeConst()
Undocumented in source. Be warned that the author may not have intended to support it.
makeImmutable
Type makeImmutable()
Undocumented in source. Be warned that the author may not have intended to support it.
makeMutable
Type makeMutable()
Undocumented in source. Be warned that the author may not have intended to support it.
makeShared
Type makeShared()
Undocumented in source. Be warned that the author may not have intended to support it.
makeSharedConst
Type makeSharedConst()
Undocumented in source. Be warned that the author may not have intended to support it.
makeSharedWild
Type makeSharedWild()
Undocumented in source. Be warned that the author may not have intended to support it.
makeSharedWildConst
Type makeSharedWildConst()
Undocumented in source. Be warned that the author may not have intended to support it.
makeWild
Type makeWild()
Undocumented in source. Be warned that the author may not have intended to support it.
makeWildConst
Type makeWildConst()
Undocumented in source. Be warned that the author may not have intended to support it.
merge2
Type merge2()

This version does a merge even if the deco is already computed. Necessary for types that have a deco, but are not merged.

modToBuffer
void modToBuffer(OutBuffer* buf)

Store this type's modifier name into buf.

modToChars
char* modToChars()

Return this type's modifier name.

mutableOf
Type mutableOf()

Make type mutable.

needsCopyOrPostblit
bool needsCopyOrPostblit()

true if when type is copied, it needs a copy constructor or postblit applied. Only applies to value types, not ref types.

needsDestruction
bool needsDestruction()

true if when type goes out of scope, it needs a destructor applied. Only applies to value types, not ref types.

needsNested
bool needsNested()
nextOf
Type nextOf()

If this is a type of something, return that something.

nullAttributes
Type nullAttributes()

Return a copy of this type with all attributes null-initialized. Useful for creating a type with different modifiers.

numberOfElems
uint numberOfElems(Loc loc)

Compute number of elements for a (possibly multidimensional) static array, or 1 for other types.

pointerTo
Type pointerTo()
Undocumented in source. Be warned that the author may not have intended to support it.
referenceTo
Type referenceTo()
Undocumented in source. Be warned that the author may not have intended to support it.
sarrayOf
Type sarrayOf(dinteger_t dim)
Undocumented in source. Be warned that the author may not have intended to support it.
sharedConstOf
Type sharedConstOf()
Undocumented in source. Be warned that the author may not have intended to support it.
sharedOf
Type sharedOf()
Undocumented in source. Be warned that the author may not have intended to support it.
sharedWildConstOf
Type sharedWildConstOf()
Undocumented in source. Be warned that the author may not have intended to support it.
sharedWildOf
Type sharedWildOf()
Undocumented in source. Be warned that the author may not have intended to support it.
size
d_uns64 size()
Undocumented in source. Be warned that the author may not have intended to support it.
size
d_uns64 size(Loc loc)
Undocumented in source. Be warned that the author may not have intended to support it.
sizemask
uinteger_t sizemask()

Return the mask that an integral type will fit into.

substWildTo
Type substWildTo(uint mod)
Undocumented in source. Be warned that the author may not have intended to support it.
syntaxCopy
Type syntaxCopy()
Undocumented in source. Be warned that the author may not have intended to support it.
toBasetype
Type toBasetype()

If this is a shell around another type, get that other type.

toChars
const(char)* toChars()

For pretty-printing a type.

toDsymbol
Dsymbol toDsymbol(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
toHeadMutable
inout(Type) toHeadMutable()

Return type with the top level of it being mutable.

toPrettyChars
char* toPrettyChars(bool QualifyTypes)

For pretty-printing a type.

toTypeFunction
TypeFunction toTypeFunction()
Undocumented in source. Be warned that the author may not have intended to support it.
trySemantic
Type trySemantic(Loc loc, Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
unSharedOf
Type unSharedOf()

Make type unshared. 0 => 0 const => const immutable => immutable shared => 0 shared const => const wild => wild wild const => wild const shared wild => wild shared wild const => wild const

unqualify
Type unqualify(uint m)
Undocumented in source. Be warned that the author may not have intended to support it.
wildConstOf
Type wildConstOf()
Undocumented in source. Be warned that the author may not have intended to support it.
wildOf
Type wildOf()

Convert to 'wild'.

Static functions

_init
void _init()
Undocumented in source. Be warned that the author may not have intended to support it.
deinitialize
void deinitialize()

Deinitializes the global state of the compiler.

Static variables

basic
Type[TMAX] basic;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
dtypeinfo
ClassDeclaration dtypeinfo;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
rtinfo
TemplateDeclaration rtinfo;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
stringtable
StringTable!Type stringtable;
Undocumented in source.
tbool
Type tbool;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tchar
Type tchar;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tcomplex32
Type tcomplex32;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tcomplex64
Type tcomplex64;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tcomplex80
Type tcomplex80;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tdchar
Type tdchar;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tdstring
Type tdstring;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
terror
Type terror;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tfloat32
Type tfloat32;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tfloat64
Type tfloat64;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tfloat80
Type tfloat80;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
thash_t
Type thash_t;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
timaginary32
Type timaginary32;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
timaginary64
Type timaginary64;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
timaginary80
Type timaginary80;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tint128
Type tint128;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tint16
Type tint16;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tint32
Type tint32;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tint64
Type tint64;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tint8
Type tint8;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tnoreturn
Type tnoreturn;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tnull
Type tnull;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tptrdiff_t
Type tptrdiff_t;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tshiftcnt
Type tshiftcnt;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tsize_t
Type tsize_t;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tstring
Type tstring;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tuns128
Type tuns128;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tuns16
Type tuns16;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tuns32
Type tuns32;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tuns64
Type tuns64;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tuns8
Type tuns8;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tvoid
Type tvoid;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
tvoidptr
Type tvoidptr;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
twchar
Type twchar;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
twstring
Type twstring;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoarray
ClassDeclaration typeinfoarray;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoassociativearray
ClassDeclaration typeinfoassociativearray;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoclass
ClassDeclaration typeinfoclass;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoconst
ClassDeclaration typeinfoconst;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfodelegate
ClassDeclaration typeinfodelegate;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoenum
ClassDeclaration typeinfoenum;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfofunction
ClassDeclaration typeinfofunction;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfointerface
ClassDeclaration typeinfointerface;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoinvariant
ClassDeclaration typeinfoinvariant;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfopointer
ClassDeclaration typeinfopointer;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfoshared
ClassDeclaration typeinfoshared;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfostaticarray
ClassDeclaration typeinfostaticarray;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfostruct
ClassDeclaration typeinfostruct;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfotypelist
ClassDeclaration typeinfotypelist;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfovector
ClassDeclaration typeinfovector;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
typeinfowild
ClassDeclaration typeinfowild;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Structs

Mcache
struct Mcache
Undocumented in source.

Variables

arrayof
Type arrayof;
Undocumented in source.
ctype
type* ctype;
Undocumented in source.
deco
char* deco;
Undocumented in source.
mod
MOD mod;
Undocumented in source.
pto
Type pto;
Undocumented in source.
rto
Type rto;
Undocumented in source.
ty
TY ty;
Undocumented in source.
vtinfo
TypeInfoDeclaration vtinfo;
Undocumented in source.

Inherited Members

From ASTNode

accept
void accept(Visitor v)

Visits this AST node using the given visitor.

Meta