Pure higher order functions

bearophile bearophileHUGS at lycos.com
Thu Jul 7 15:19:27 PDT 2011


KennyTM~:

> On Jul 8, 11 00:43, KennyTM~ wrote:
> > No, I think it's a bug in pure-inference.
> >
> > pure int h() {
> >      return 1;
> > }
> > int f(alias g)() {
> >      return g();
> > }
> > pure int i() {
> >      return f!h();  // pure function 'i' cannot call impure function 'f'
> > }
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=6265

I was probably wrong, as usual. Thank you for seeing the real problem and for the bug report :-)
Maybe this is worth fixing before DMD 2.054 goes out of beta, I am not sure.

Bye,
bearophile


More information about the Digitalmars-d mailing list