Re: const of AliasSeq is silently ignored

2019-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/8/19 3:56 PM, Yuxuan Shui wrote: In this example:     const(AliasSeq!(int, int)) a;     pragma(msg, typeof(a)); // (int, int) This kind of make sense, since AliasSeq is not a "single" type. But silently dropping const seems bad, the compiler should probably report an error/warning in

Re: const of AliasSeq is silently ignored

2019-04-09 Thread Paul Backus via Digitalmars-d-learn
On Monday, 8 April 2019 at 19:56:50 UTC, Yuxuan Shui wrote: In this example: const(AliasSeq!(int, int)) a; pragma(msg, typeof(a)); // (int, int) This kind of make sense, since AliasSeq is not a "single" type. But silently dropping const seems bad, the compiler should probably report

Re: const of AliasSeq is silently ignored

2019-04-09 Thread Alex via Digitalmars-d-learn
On Monday, 8 April 2019 at 19:56:50 UTC, Yuxuan Shui wrote: In this example: const(AliasSeq!(int, int)) a; pragma(msg, typeof(a)); // (int, int) This kind of make sense, since AliasSeq is not a "single" type. But silently dropping const seems bad, the compiler should probably report

Re: const of AliasSeq is silently ignored

2019-04-08 Thread Ali Çehreli via Digitalmars-d-learn
On 04/08/2019 12:56 PM, Yuxuan Shui wrote: In this example:     const(AliasSeq!(int, int)) a; I would expect that to mean a type list (int, int) that cannot be modified, meaning that it is not allowed to change it from (int, int).     pragma(msg, typeof(a)); // (int, int) Makes sense

const of AliasSeq is silently ignored

2019-04-08 Thread Yuxuan Shui via Digitalmars-d-learn
In this example: const(AliasSeq!(int, int)) a; pragma(msg, typeof(a)); // (int, int) This kind of make sense, since AliasSeq is not a "single" type. But silently dropping const seems bad, the compiler should probably report an error/warning in this case?