[Issue 6931] New: scope parameter storage class not checked at all
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 11 07:18:38 PST 2011
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: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at 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: -------
More information about the Digitalmars-d-bugs
mailing list