dmd.typinf
Generate TypeInfo
objects, which are needed for run-time introspection of types.
License
Source: typeinf.d
Documentation: https://dlang.org/phobos/dmd_typinf.html
-
Declaration
void
genTypeInfo
(Expressione
, const ref Locloc
, Typetorig
, Scope*sc
, boolgenObjCode
= true);Generates the
TypeInfo
object associated with
if it hasn't already been generatedtorig
Parameters
Expression
e
if not
null
, then expression for pretty-printing errorsLoc
loc
the location for reporting line numbers in errors
Type
torig
the type to generate the
TypeInfo
object forScope*
sc
the scope
bool
genObjCode
if
true
, object code will be generated for the obtained TypeInfo -
Declaration
Type
getTypeInfoType
(const ref Locloc
, Typet
, Scope*sc
, boolgenObjCode
= true);Gets the type of the
TypeInfo
object associated witht
Parameters
Loc
loc
the location for reporting line nunbers in errors
Type
t
the type to get the type of the
TypeInfo
object forScope*
sc
the scope
bool
genObjCode
if
true
, object code will be generated for the obtained TypeInfoReturn Value
The type of the
TypeInfo
object associated witht
-
Declaration
bool
isSpeculativeType
(Typet
);Return Value
true
if any part of typet
is speculative. ift
isnull
, returnsfalse
.