www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5186] New: typeof({return 0;}()) works in alias declaration, not as variable type

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

           Summary: typeof({return 0;}()) works in alias declaration, not
                    as variable type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras gmail.com> 2010-11-07 17:18:42
PST ---
This works:

alias typeof( { return 0; }() ) T;
T foo;

This doesnt (found 'foo' when expecting ';' following statement):

typeof( { return 0; }() ) foo;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5186


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-15 11:48:32 PDT ---
*** This issue has been marked as a duplicate of issue 4633 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 15 2011