[Issue 6980] Disallow shadowing template parameters
https://issues.dlang.org/show_bug.cgi?id=6980 Basile-z changed: What|Removed |Added CC||and...@erdani.com --- Comment #4 from Basile-z --- *** Issue 14516 has been marked as a duplicate of this issue. *** --
[Issue 6980] Disallow shadowing template parameters
https://issues.dlang.org/show_bug.cgi?id=6980 Basile-z changed: What|Removed |Added Severity|enhancement |normal --
[Issue 6980] Disallow shadowing template parameters
https://issues.dlang.org/show_bug.cgi?id=6980 Basile-z changed: What|Removed |Added Keywords||accepts-invalid CC||b2.t...@gmx.com Hardware|Other |All OS|Windows |All --- Comment #3 from Basile-z --- This is a bug given that you cant select the first definition. However, this should works when T is an alias template parameter and that T is either a function or an overload set. That is not the case now: ```d struct S(alias T) { alias T = (int) => 0; void test() { T(0.1); // Error: function literal `__lambda3(int __param_0)` is not callable // using argument types `(double)` T(1); } } void main(string[] args) { S!((float) => 0) s1; } ``` --
[Issue 6980] Disallow shadowing template parameters
https://issues.dlang.org/show_bug.cgi?id=6980 Bolpat changed: What|Removed |Added CC||qs.il.paperi...@gmail.com --- Comment #2 from Bolpat --- The general sense of when shadowing a symbol is an error or not is if the symbol has an unambiguous way to be referenced. This expectation is broken when template parameters are shadowed: ```d struct S(T) { alias T = int; // no error!? T x; pragma(msg, typeof(x)); // int } S!double unused; ``` --
[Issue 6980] Disallow shadowing template parameters
https://issues.dlang.org/show_bug.cgi?id=6980 Iain Buclaw changed: What|Removed |Added Priority|P2 |P4 --
[Issue 6980] Disallow shadowing template parameters
https://d.puremagic.com/issues/show_bug.cgi?id=6980 Infiltrator lt.infiltra...@gmail.com changed: What|Removed |Added CC||lt.infiltra...@gmail.com --- Comment #1 from Infiltrator lt.infiltra...@gmail.com 2014-03-19 22:02:54 PDT --- This could certainly be a source of unexpected bugs. Has anybody dug into this? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---