digitalmars.D.bugs - [Issue 10231] New: Spec: Document alias value feature
- d-bugmail puremagic.com (33/33) Jun 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10231
- d-bugmail puremagic.com (10/10) Jun 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10231
- d-bugmail puremagic.com (17/18) Jun 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10231
http://d.puremagic.com/issues/show_bug.cgi?id=10231 Summary: Spec: Document alias value feature Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: spec Severity: minor Priority: P2 Component: websites AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 13:54:22 PDT --- Recently Kenji mentioned that the following works: ----- struct X(alias int x) { } void main() { int i; alias X!i IVal; // ok float f; alias X!f FVal; // fail } ----- Even if this is allowed by the current syntax rules, it is largely an undocumented feature (compiler implementers could easily miss this feature as well). It should be properly documented. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10231 Maxim Fomin <maxim maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim maxim-fomin.ru --- By the way, it seems it does not support implicit type conversions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10231 14:37:18 PDT ---By the way, it seems it does not support implicit type conversions.For that I think I'd like this enhancement to work: ----- struct X(alias T x, T : int) { } void main() { short i; alias X!i IVal; } ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2013