digitalmars.D.bugs - [Issue 556] New: is (Type Identifier : TypeSpecialization) doesn't work as it should
- d-bugmail puremagic.com (39/39) Nov 18 2006 http://d.puremagic.com/issues/show_bug.cgi?id=556
- d-bugmail puremagic.com (4/4) Oct 04 2007 http://d.puremagic.com/issues/show_bug.cgi?id=556
- d-bugmail puremagic.com (9/9) Oct 20 2007 http://d.puremagic.com/issues/show_bug.cgi?id=556
http://d.puremagic.com/issues/show_bug.cgi?id=556 Summary: is (Type Identifier : TypeSpecialization) doesn't work as it should Product: D Version: 0.174 Platform: PC URL: http://www.digitalmars.com/d/expression.html#IsExpressio n OS/Version: Windows Status: NEW Keywords: spec Severity: normal Priority: P4 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: deewiant gmail.com OtherBugsDependingO 511 nThis: A code snippet somewhat modified from what's in the spec: alias short bar; void foo(bar x) { static if (is (bar T : int)) alias T S; else alias real S; static assert (is (S == int)); } void main() { bar x; foo(x); } This fails, though according to the spec it should work. What's strange is that replacing the first two lines of foo() with the following works: static if (is (bar : int)) alias int S; Disclaimer: I haven't used this (is (Type Identifier)) feature at all, so I'm not 100% sure. But if this isn't meant to work then the example code in the spec is wrong. --
Nov 18 2006
http://d.puremagic.com/issues/show_bug.cgi?id=556 The documentation is in error, I'll fix it. --
Oct 04 2007
http://d.puremagic.com/issues/show_bug.cgi?id=556 braddr puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Docs updated in 1.022/2.005 --
Oct 20 2007