TypeFunction

extern (C++) final
class TypeFunction : TypeNext {
ParameterList parameterList;
bool isnothrow;
bool isnogc;
bool isproperty;
bool isref;
bool isreturn;
bool isscope;
bool isreturninferred;
bool isscopeinferred;
bool islive;
LINK linkage;
TRUST trust;
PURE purity;
ubyte iswild;
Expressions* fargs;
int inuse;
bool incomplete;
}

Members

Functions

callMatch
MATCH callMatch(Type tthis, Expression[] args, int flag = 0, const(char)** pMessage = null, Scope* sc = null)

'args' are being matched to function 'this' Determine match level.

hasLazyParameters
bool hasLazyParameters()

Return true if there are lazy parameters.

isDstyleVariadic
bool isDstyleVariadic()

Check for extern (D) U func(T t, ...) variadic function type, which has _arguments[] added as the first argument.

parameterEscapes
bool parameterEscapes(Type tthis, Parameter p)

Examine function signature for parameter p and see if the value of p can 'escape' the scope of the function. This is useful to minimize the needed annotations for the parameters.

parameterStorageClass
StorageClass parameterStorageClass(Type tthis, Parameter p)

Take the specified storage class for p, and use the function signature to infer whether STC.scope_ and STC.return_ should be OR'd in. (This will not affect the name mangling.)

purityLevel
void purityLevel()

Set 'purity' field of 'this'. Do this lazily, as the parameter types might be forward referenced.

Inherited Members

From TypeNext

nextOf
Type nextOf()

For TypeFunction, nextOf() can return NULL if the function return type is meant to be inferred, and semantic() hasn't yet ben run on the function. After semantic(), it must no longer be NULL.

Meta