Type

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

Constructors

this
this(TY ty)
Undocumented in source.

Members

Enums

DotExpFlag
enum DotExpFlag

dotExp() bit flags

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
void checkComplexTransition(Loc loc)

Bugzilla 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
ubyte deduceWild(Type t, bool isRef)

Return MOD bits matching this type to wild parameter type (tprm).

defaultInit
Expression defaultInit(Loc loc)
Undocumented in source. Be warned that the author may not have intended to support it.
defaultInitLiteral
Expression defaultInitLiteral(Loc loc)

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

dotExp
Expression dotExp(Scope* sc, Expression e, Identifier ident, int flag)

Access the members of the object e. This type is same as e->type.

dyncast
int 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.

getProperty
Expression getProperty(Loc loc, Identifier ident, int flag)

Calculate built-in properties which just the type is necessary.

getTypeInfoIdent
Identifier getTypeInfoIdent()
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
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.
isTypeBasic
TypeBasic isTypeBasic()
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.
merge
Type merge()
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.

modifiersApply
int modifiersApply(void* param, int function(void*, const(char)*) fp)

For each active modifier (MODconst, MODimmutable, etc) call fp with a void* for the work param and a string representation of the attribute.

mutableOf
Type mutableOf()

Make type mutable.

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.

noMember
Expression noMember(Scope* sc, Expression e, Identifier ident, int flag)

Figures out what to do with an undefined member reference for classes and structs.

nullAttributes
Type nullAttributes()

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

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.
resolve
void resolve(Loc loc, Scope* sc, Expression* pe, Type* pt, Dsymbol* ps, bool intypeid)

Resolve 'this' type to either type, symbol, or expression. If errors happened, resolved to Type.terror.

resolveExp
void resolveExp(Expression e, Type* pt, Expression* pe, Dsymbol* ps)

Normalize e as the result of Type.resolve() process.

sarrayOf
Type sarrayOf(dinteger_t dim)
Undocumented in source. Be warned that the author may not have intended to support it.
semantic
Type semantic(Loc loc, Scope* sc)
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.
toExpression
Expression toExpression()

We've mistakenly parsed this as a type. Redo it as an Expression. NULL if cannot.

toHeadMutable
Type toHeadMutable()

Return type with the top level of it being mutable.

toPrettyChars
char* toPrettyChars(bool QualifyTypes)
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.
error
void error(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
warning
void warning(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.

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.
sizeTy
ubyte[TMAX] sizeTy;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
stringtable
StringTable stringtable;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
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.
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.
tvalist
Type tvalist;
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.

Variables

arrayof
Type arrayof;
Undocumented in source.
cto
Type cto;
Undocumented in source.
ctype
type* ctype;
Undocumented in source.
deco
char* deco;
Undocumented in source.
ito
Type ito;
Undocumented in source.
mod
MOD mod;
Undocumented in source.
pto
Type pto;
Undocumented in source.
rto
Type rto;
Undocumented in source.
scto
Type scto;
Undocumented in source.
sto
Type sto;
Undocumented in source.
swcto
Type swcto;
Undocumented in source.
swto
Type swto;
Undocumented in source.
ty
TY ty;
Undocumented in source.
vtinfo
TypeInfoDeclaration vtinfo;
Undocumented in source.
wcto
Type wcto;
Undocumented in source.
wto
Type wto;
Undocumented in source.

Inherited Members

From RootObject

equals
bool equals(RootObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
compare
int compare(RootObject )
Undocumented in source. Be warned that the author may not have intended to support it.
print
void print()
Undocumented in source. Be warned that the author may not have intended to support it.
toChars
const(char)* toChars()
Undocumented in source. Be warned that the author may not have intended to support it.
toBuffer
void toBuffer(OutBuffer* buf)
Undocumented in source. Be warned that the author may not have intended to support it.
dyncast
int dyncast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta