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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 6 07:07:37 PST 2011


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



--- Comment #1 from Alex Rønne Petersen <xtzgzorex at gmail.com> 2011-12-06 07:07:37 PST ---
(In reply to comment #0)
> 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.

Also fails with this simpler example:

static this()
{
    string f(int[] arr...)
    {
    }
}

-- 
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