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

           Summary: scope parameter storage class not checked at all
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r <mrmoc...@gmx.de> 2011-11-11 07:17:58 PST ---
int ga;
C gb;
S* gc;
int[] gd;

struct S {}
class C {}

void foo(scope int a, scope C b, scope S* c, scope int[] d)
{
    ga = a;
    gb = b;
    gc = c;
    gd = d;
    ga = d[1];
}

void main()
{
    S s;
    foo(5, new C, &s, [1,2,3]);
}

This compiles and runs fine. Shouldn't at least some of these cause errors?

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

Reply via email to