2 * Implements the `alias this` symbol.
4 * Specification: $(LINK2 https://dlang.org/spec/class.html#alias-this, Alias This)
6 * Copyright: Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved
7 * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
8 * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
9 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d, _aliasthis.d)
10 * Documentation: https://dlang.org/phobos/dmd_aliasthis.html
11 * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aliasthis.d
16 import core
.stdc
.stdio
;
19 import dmd
.identifier
;
23 /***********************************************************
26 extern (C
++) final class AliasThis
: Dsymbol
29 /// The symbol this `alias this` resolves to
31 /// Whether this `alias this` is deprecated or not
34 extern (D
) this(const ref Loc loc
, Identifier ident
) @safe
36 super(loc
, null); // it's anonymous (no identifier)
40 override AliasThis
syntaxCopy(Dsymbol s
)
43 auto at
= new AliasThis(loc
, ident
);
48 override const(char)* kind() const
53 AliasThis
isAliasThis()
58 override void accept(Visitor v
)
63 override bool isDeprecated() const
65 return this.isDeprecated_
;