https://issues.dlang.org/show_bug.cgi?id=14781
--- Comment #4 from Steven Schveighoffer <[email protected]> --- (In reply to Denis Shelomovskij from comment #3) > Do you mean this code should compile? Yes. > If so, either pure function `bar` can > call an impure function or impure delegate is implicitly convertible to a > pure one. No, but I made an error in the example from what I meant. should be: auto foo(out int delegate() impureDg) pure { ... impureDg = &(bar!()); > If you are opening an issue with an enhancement please provide a clear and > concise testcase. Thanks. It's hard to make a test case that "should compile" without making an error with no compiler to help you :D Really, the issue is that bar doesn't compile, not that the impure delegate can't be assigned. --
