[Issue 11048] New: Default arguments not taken into account when being called by pure functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 15 14:54:17 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11048
Summary: Default arguments not taken into account when being
called by pure functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-09-15 14:54:15 PDT ---
int x = 7;
void foo() pure
{
// Does not detect use of mutable global and compiles when it shouldn't.
bar();
// Correctly detects the use of a mutable global and gives an error
baz(x);
}
void bar(int a = x) pure {}
void baz(int a) pure {}
void main() {}
--
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