https://d.puremagic.com/issues/show_bug.cgi?id=10963
Peter Alexander <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |[email protected] | |m Component|Phobos |DMD Summary|filter.save in map changes |Wrong code with aliased |the behavior of filter |function referencing | |closure variable --- Comment #1 from Peter Alexander <[email protected]> 2014-02-23 05:30:19 PST --- This is a code gen bug. I have minimized it as much as I can: http://dpaste.dzfl.pl/e2e878490438 ------------------------------------- void test(int[] a) { assert(a.length == 1); } struct A(alias p) { this(int a) { p(); } A foo() { return A(0); } } void main() { int[] a = [0]; () { A!(() => test(a))(0).foo(); }(); } ------------------------------------- The assert still fires, despite the fact that test is only ever called with 'main.a', which never changes. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
