https://issues.dlang.org/show_bug.cgi?id=23361
Imperatorn <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |om --- Comment #1 from Imperatorn <[email protected]> --- I took a look at this. If you mark the following as pure: normalize decompose decomposeHangul Then there's only this that needs to be pure (in normalize) () @trusted { decomposed.assumeSafeAppend(); ccc.length = 0; ccc.assumeSafeAppend(); } (); To cheat and not make the appenders pure but the block pure we can just add pure: () @trusted pure { decomposed.assumeSafeAppend(); ccc.length = 0; ccc.assumeSafeAppend(); } (); But, we still need some way there to allow calling the impure append from the pure block. Maybe we could cast some function pointer to pure, I don't know. I tested wrapping it in a debug block and that makes it work, but I'm not sure what the "real" solution would look like. () @trusted pure { debug { decomposed.assumeSafeAppend(); ccc.length = 0; ccc.assumeSafeAppend(); } } (); --
