www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1770] New: std.typecons.defineEnum example does not compile

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1770

           Summary: std.typecons.defineEnum example does not compile
           Product: D
           Version: 2.009
          Platform: All
               URL: http://www.digitalmars.com/d/phobos/std_typecons.html
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: gide nwawudu.com


Example in std.typecons for defineEnum given on the page
http://www.digitalmars.com/d/phobos/std_typecons.html does not compile.
Probably due to the changes made to enum in DMD version 2.009.

test.d
------
mixin(defineEnum!("Abc", "A", "B", 5, "C"));

C:\> dmd test.d
D:\dmd\bin\..\src\phobos\std\typecons.d(234): template instance identifier
'ValueType' is not defined
D:\dmd\bin\..\src\phobos\std\typecons.d(237): template instance
std.typecons.StringsOnly!(255) error instantiating


-- 
Jan 05 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1770






This looks like an installation problem. The example works properly on my
system. Could you please remove and then reinstall dmd from scratch?


-- 
Jan 05 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1770


gide nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Thanks, re-installing fixed the issue.


-- 
Jan 24 2008