[Issue 15167] [REG2.069-devel] conflicting error with repeated alias declaration

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Oct 6 19:52:58 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15167

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[Reg 2.069-devel]           |[REG2.069-devel]
                   |conflicting error with      |conflicting error with
                   |repeated alias declaration  |repeated alias declaration

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
Introduced in:
https://github.com/D-Programming-Language/dmd/pull/4816

> It might indeed be treated as conflict but it used to work with 2.068.2 as long as one of the aliases is within a static if.

Yes, it was a bug and fixed as issue 13203.

----

If we will accept the snippet code as valid, it would need additional rule for
the overloaded alias declarations:

- If two overloaded alias declarations are aliases of an identical type, they
don't conflict.

// simplest example case
alias a = int;
alias a = int;  // identical, no conflict

alias b = int:
alias b = const int;  // not identical, conflict

How about that?

--


More information about the Digitalmars-d-bugs mailing list