http://d.puremagic.com/issues/show_bug.cgi?id=7554



--- Comment #3 from bearophile_h...@eml.cc 2012-02-27 15:27:55 PST ---
This code compiles, but I don't remember if this used to compile even before
fixing bug 7500 :


int outer(immutable int function(in int) pure foo) pure {
     pure int inner() {
         return foo(5);
     }
     return inner();
}
int sqr(in int x) pure {
     return x * x;
}
void main() {
     assert(outer(&sqr) == 25);
}



This doesn't compile still:

T outer(T)(immutable T function(T) pure foo) pure {
     pure int inner() {
         return foo(5);
     }
     return inner();
}
int sqr(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: -------

Reply via email to