dmd.aliasthis
Implements the alias this symbol.
Specification: Alias This
License
Source: aliasthis.d
Documentation: https://dlang.org/phobos/dmd_aliasthis.html
-
Declaration
classAliasThis: dmd.dsymbol.Dsymbol;alias ident this;
-
Declaration
Dsymbolsym;The symbol this
alias thisresolves to -
Declaration
boolisDeprecated_;Whether this
alias thisis deprecated or not
-
-
Declaration
ExpressionresolveAliasThis(Scope*sc, Expressione, boolgag= false, boolfindOnly= false);Find the
alias thissymbol ofe's type.Parameters
Scope*sccontext
Expressioneexpression forming the
thisboolgagif
truedo not print errors, returnnullinsteadboolfindOnlydon't do further processing like resolving properties, i.
e. just return plain dotExp() result.Return Value
Expression that is
e.aliasthis -
Declaration
boolcheckDeprecatedAliasThis(AliasThisat, const ref Locloc, Scope*sc);Check if an
alias thisis deprecatedDiscussion
Usually one would use
expression.checkDeprecated(scope, aliasthis)to check ifexpressionuses a deprecatedaliasthis, but this callstoPrettyCharswhich lead to the following message: "Deprecation: alias thisfullyqualified.aggregate.__anonymousis deprecated"Parameters
AliasThisatThe
AliasThisobject to checkLoclocLocof the expression triggering the access toatScope*scScopeof the expression (deprecations do not trigger in deprecated scopes)Return Value
Whether the alias this was reported as deprecated.
-
Declaration
boolisRecursiveAliasThis(ref Typeatt, Typet);Check and set '
att' if 't' is a recursive 'alias this' typeParameters
Typeatttype reference used to detect recursion
Typet'alias this' type
Return Value
Whether the 'alias this' is recursive or not