[Issue 7073] New: Parsing of class-returning varargs function inside module ctor fails

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 6 06:47:22 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7073

           Summary: Parsing of class-returning varargs function inside
                    module ctor fails
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: xtzgzorex at gmail.com


--- Comment #0 from Alex Rønne Petersen <xtzgzorex at gmail.com> 2011-12-06 06:47:21 PST ---
Code:

class A
{
}

static this()
{
    A foo(A[] a ...)
    {
        return new A();
    }
}

Errors:

test.d(7): found 'foo' when expecting ';' following statement
test.d(11): found '}' when expecting ';' following statement
test.d(12): found 'EOF' when expecting '}' following compound statement

Removing the "..." makes it parse correctly.

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


More information about the Digitalmars-d-bugs mailing list