[Issue 23361] std.uni.normalize should be pure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 14 17:35:35 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23361

--- Comment #4 from Ate Eskola <Ajieskola at gmail.com> ---
Oh, it seems I have missed your comment - I just figured all this out myself
creating a fix for this when I could just have read your message.

I solved the assumeSafeAppend thing by marking the calls pure.

(But with a cast - does simply marking the lambda pure really work? I thought
even `@trusted` code lets to treat impure calls as pure only with an explicit
cast.)

I think it's okay because... well let me copy my comment from the code as
explaination:

---
// assumeSafeAppend isn't considered pure as of writing, hence the
// cast. It isn't pure in the sense that the elements after
// the array in question are affected, but we don't use those
// making the call pure for our purposes.
---

--


More information about the Digitalmars-d-bugs mailing list