[Issue 20863] Pass into template by alias drops qualifier

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 25 23:07:21 UTC 2020


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

Adam D. Ruppe <destructionator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |destructionator at gmail.com

--- Comment #2 from Adam D. Ruppe <destructionator at gmail.com> ---
I'm actually not sure if this is a bug or not.

But I didn't even know literal values were allowed to be passed to aliases, so
I'm apparently behind the times!

But the spec isn't clear on if it takes built-in types at all, and is also
underspecified on if it actually accepts a type or a symbol.

My thought is if it takes a symbol, the immutable qualifier might get
legitimately dropped because that's part of the local type instead of the
global symbol.

Of course it is more useful to just define it to take the whole type and be the
same thing! But we should clarify the spec as well as the implementation to
make it clear this is what is supposed to happen.

--


More information about the Digitalmars-d-bugs mailing list