[Issue 7554] Immutable function pointer arguments too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 26 08:23:41 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7554
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-02-26 08:23:38 PST ---
I think making inner() pure isn't necessary.
Following raises no error and works as expected.
T outer(T)(T function(in T) pure foo) pure {
int inner() {
return foo(5);
}
return inner();
}
int sqr(in int x) pure {
return x * x;
}
void main() {
assert(outer(&sqr) == 25);
}
--
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