www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2866] New: Can't declare static struct inside function scope

reply d-bugmail puremagic.com writes:

           Summary: Can't declare static struct inside function scope
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dsimcha yahoo.com

void foo() {
    static struct Bar {
        uint doStuff() {
            return a;

D:\code\test.d(4): basic type expected, not struct
D:\code\test.d(4): no identifier for declarator int
D:\code\test.d(4): semicolon expected, not 'struct'

Before nested structs, one could declare a non-nested struct inside a function
scope by simply omitting the static keyword.

Apr 20 2009
parent d-bugmail puremagic.com writes:

David Simcha <dsimcha yahoo.com> changed:

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

--- Comment #1 from David Simcha <dsimcha yahoo.com> 2010-08-11 14:12:17 PDT ---
This appears to have been fixed at some point in the past.

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 11 2010