www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3071] New: nested func declaration parse problem

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

           Summary: nested func declaration parse problem
           Product: D
           Version: 2.028
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: davidl 126.com


void func1(invariant(void)[] t)
{
    size_t func2(invariant(void)[] t)
    {
        return 0;
    }    
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3071


Gide Nwawudu <gide nwawudu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |gide nwawudu.com





Does not compile with DMD v2.030. Changing size_t to int and/or replacing
invariant(int)[] with int[] makes the code compile.

test.d
------
void func1()
{
    size_t func2(invariant(void)[] t)
    {
        return 0;
    }

}


C:\>dmd test.d
test.d(5): found 'func2' when expecting ';' following 'statement'
test.d(10): found '}' when expecting ';' following 'statement'
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement
test.d(12): found 'EOF' instead of statement

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 17 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3071


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED





02:56:56 PDT ---
Fixed dmd 2.031

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 09 2009