Bug 23920 – object.require modifies AA before populating value

Status
NEW
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-05-13T11:56:28Z
Last change time
2024-12-07T13:42:44Z
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#17462 →

Comments

Comment #0 by dlang-bugzilla — 2023-05-13T11:56:28Z
////////////////// test.d ////////////////// void main() { int[int] aa; try aa.require(5, { if (true) throw new Exception("oops"); else return 1; }()); catch (Exception e) {} assert(5 !in aa); } //////////////////////////////////////////// This allows bypassing the type system, as it allows the "construction" of types with `@disable this();`.
Comment #1 by robert.schadek — 2024-12-07T13:42:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17462 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB