dmd.typinf
Generate TypeInfo
objects, which are needed for run-time introspection of types.
License
Source: typinf.d
Documentation: https://dlang.org/phobos/dmd_typinf.html
-
Declaration
bool
genTypeInfo
(Expressione
, const ref Locloc
, Typetorig
, Scope*sc
);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
Return Value
true
ifTypeInfo
was generated and needs compiling to object file -
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
.