dmd.aliasthis
Implements the alias this
symbol.
Specification: Alias This
License
Source: aliasthis.d
Documentation: https://dlang.org/phobos/dmd_aliasthis.html
-
Declaration
class
AliasThis
: dmd.dsymbol.Dsymbol;alias ident this;
-
Declaration
Dsymbol
sym
;The symbol this
alias this
resolves to -
Declaration
bool
isDeprecated_
;Whether this
alias this
is deprecated or not
-
-
Declaration
bool
checkDeprecatedAliasThis
(AliasThisat
, ref const Locloc
, Scope*sc
);Check if an
alias this
is deprecatedDiscussion
Usually one would use
expression.checkDeprecated(scope, aliasthis)
to check ifexpression
uses a deprecatedaliasthis
, but this callstoPrettyChars
which lead to the following message: "Deprecation: alias thisfullyqualified.aggregate.__anonymous
is deprecated"Parameters
AliasThis
at
The
AliasThis
object to checkLoc
loc
Loc
of the expression triggering the access toat
Scope*
sc
Scope
of the expression (deprecations do not trigger in deprecated scopes)Return Value
Whether the alias this was reported as deprecated.
-
Declaration
bool
isRecursiveAliasThis
(ref Typeatt
, Typet
);Check and set '
att
' if 't
' is a recursive 'alias this' typeParameters
Type
att
type reference used to detect recursion
Type
t
'alias this' type
Return Value
Whether the 'alias this' is recursive or not