[Issue 11046] [enh] Pure functions with default and out parameters are allowed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 15 14:45:01 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11046
safety0ff.bugz at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |safety0ff.bugz at gmail.com
--- Comment #5 from safety0ff.bugz at gmail.com 2013-09-15 14:44:56 PDT ---
I think the problem is this:
import std.stdio;
pure foo1() { bar();} // Compiles (accepts-invalid)
//pure foo2() { bar(x);} // Equivalent but doesn't compile (correct behaviour)
pure bar(out int arg = x) { }
int x = 1;
void main()
{
foo1();
writeln(x); // 0
}
--
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