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

--- Comment #0 from Trass3r <> 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:
------- You are receiving this mail because: -------

Reply via email to