[Issue 19794] const on AliasSeq ignored
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 16 21:06:20 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=19794
Basile-z <b2.temp at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Priority|P4 |P3
CC| |b2.temp at gmx.com
Hardware|x86_64 |All
OS|Linux |All
Severity|enhancement |normal
--- Comment #3 from Basile-z <b2.temp at gmx.com> ---
Not and ER, that is well a bug, according to
https://dlang.org/spec/const3.html#const_type
> [...]. Each applies transitively to all subtypes.
The problem is that the DMD class `TypeTuple` (in mtype.d) does not override
`.constOf`, `immutableOf()`, etc.
Tagging as accept-invalid given that
```d
alias AliasSeq(T...) = T;
const(AliasSeq!(int, int)) a;
void main()
{
a[0] = 1;
}
```
should be reject just like when `const` is variable storage class.
--
More information about the Digitalmars-d-bugs
mailing list