[Issue 13060] @nogc reading an associative array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 22 10:57:26 UTC 2022


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

Luís Ferreira <contact at lsferreira.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |contact at lsferreira.net
         Resolution|WONTFIX                     |---

--- Comment #3 from Luís Ferreira <contact at lsferreira.net> ---
(In reply to Vladimir Panteleev from comment #1)
> If the index is not in the AA, then a RangeError is thrown. The error is
> currently allocated on the GC heap.
> 
> The "in" operator is @nogc, though.

This is not true. I think it never was, but, at least, right now, the
RangeError is statically allocated on thread-local storage. And this is a
bounds check, the same as normal array indexing.

--


More information about the Digitalmars-d-bugs mailing list