Bug 24533 – clamp with smaller-than-int T1 fails to compile with literal parameters

Status
NEW
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-05-03T16:54:12Z
Last change time
2024-12-01T16:42:28Z
Assigned to
No Owner
Creator
elpenguino+D
Moved to GitHub: phobos#10549 →

Comments

Comment #0 by elpenguino+D — 2024-05-03T16:54:12Z
Since DMD 2.099, this code fails to compile: ``` assert(clamp(ubyte(4), 1, 5) == 4); ``` Likely cause is https://github.com/dlang/phobos/pull/8293
Comment #1 by robert.schadek — 2024-12-01T16:42:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10549 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB