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 a local clone.


Miscellaneous declarations, including typedef, alias, variable declarations including the implicit this declaration, type tuples, ClassInfo, ModuleInfo and various TypeInfos.
bool checkFrameAccess(Loc loc, Scope* sc, AggregateDeclaration ad, size_t iStart = 0);
Check to see the aggregate type is nested and its context pointer is accessible from the current scope. Returns true if error occurs.
bool modifyFieldVar(Loc loc, Scope* sc, VarDeclaration var, Expression e1);
Mark variable v as modified if it is inside a constructor that var is a field in. Also used to allow immutable globals to be initialized inside a static constructor.
true if it's an initialization of v
void ObjectNotFound(Loc loc, Identifier id);
abstract class Declaration: dmd.dsymbol.Dsymbol;
final bool checkDisabled(Loc loc, Scope* sc, bool isAliasedDeclaration = false);
Issue an error if an attempt to call a disabled method is made
If the declaration is disabled but inside a disabled function, returns true but do not issue an error message.
Loc loc Location information of the call
Scope* sc Scope in which the call occurs
bool isAliasedDeclaration if true searches overload set
true if this Declaration is @disabled, false otherwise.
final Modifiable checkModify(Loc loc, Scope* sc, Expression e1, ModifyFlags flag);
Check to see if declaration can be modified in this context (sc). Issue error if not.
Loc loc location for error messages
Expression e1 null or this expression when this declaration is a field
Scope* sc context
ModifyFlags flag if the first bit is set it means do not issue error message for invalid modification; if the second bit is set, it means that this declaration is a field and a subfield of it is modified.
Modifiable.yes or Modifiable.initialization
final const LINK resolvedLinkage();
Returns the linkage, resolving the target-specific System one.
final const pure nothrow @nogc @safe bool isReference();
Whether the variable is a reference, annotated with out or ref
class TupleDeclaration: dmd.declaration.Declaration;
void foreachVar(scope void delegate(Dsymbol) dg);
Calls dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration inside VarExp (isexp == true).
void delegate(Dsymbol) dg delegate to call for each Dsymbol
int foreachVar(scope int delegate(Dsymbol) dg);
Calls dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration inside VarExp (isexp == true). If dg returns !=0, stops and returns that value else returns 0.
int delegate(Dsymbol) dg delegate to call for each Dsymbol
last value returned by dg()
class AliasDeclaration: dmd.declaration.Declaration;
const bool isAliasedTemplateParameter();
true if this instance was created to make a template parameter visible in the scope of a template body, false otherwise
class OverDeclaration: dmd.declaration.Declaration;
class VarDeclaration: dmd.declaration.Declaration;
final bool isDataseg();
Does symbol go into data segment? Includes extern variables.
final bool isThreadlocal();
Does symbol go into thread local storage?
final bool isCTFE();
Can variable be read and written by CTFE?
final @safe bool canTakeAddressOf();
Return true if we can take the address of this variable.
final @safe bool needsScopeDtor();
Return true if variable needs to call the destructor.
final Expression callScopeDtor(Scope* sc);
If a variable has a scope destructor call, return call for it. Otherwise, return NULL.
final Expression getConstInitializer(bool needFullType = true);
If variable has a constant expression initializer, get it. Otherwise, return null.
final Expression expandInitializer(Loc loc);
Helper function for the expansion of manifest constant.
final bool checkNestedReference(Scope* sc, Loc loc);
Check to see if this variable is actually in an enclosing function rather than the current one. Update nestedrefs[], closureVars[] and outerVars[].
true if error occurs.
class BitFieldDeclaration: dmd.declaration.VarDeclaration;
C11 bit fields
final ulong getMinMax(Identifier id);
Retrieve the .min or .max values. Only valid after semantic analysis.
Identifier id Id.min or Id.max
the min or max value
class SymbolDeclaration: dmd.declaration.Declaration;
This is a shell around a back end symbol
class TypeInfoStructDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoClassDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoInterfaceDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoPointerDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoArrayDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoStaticArrayDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoAssociativeArrayDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoEnumDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoFunctionDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoDelegateDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoTupleDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoConstDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoInvariantDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoSharedDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoWildDeclaration: dmd.declaration.TypeInfoDeclaration;
class TypeInfoVectorDeclaration: dmd.declaration.TypeInfoDeclaration;
class ThisDeclaration: dmd.declaration.VarDeclaration;
For the "this" parameter to member functions