Bug 22599 – Infinite loop using join with alias this and non-ascii unicode

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-12-14T17:43:07Z
Last change time
2024-12-01T16:39:43Z
Assigned to
No Owner
Creator
yazan.dabain
Moved to GitHub: phobos#9834 →

Comments

Comment #0 by yazan.dabain — 2021-12-14T17:43:07Z
Running the code below results in an infinite loop. Removing alias this, the map call or using ascii makes the code run as expected. ``` import std.algorithm: map; import std.array: join; struct T { string a; alias a this; } void main() { auto t = [ T("أ") ]; // has to contain non-ascii unicode (this is the arabic letter أ) auto s = t.map!(same => same).join(); } ```
Comment #1 by robert.schadek — 2024-12-01T16:39:43Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9834 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB