June 19, 2018 [Issue 19008] New: core.internal.convert.toUbyte doesn't work on enums | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19008 Issue ID: 19008 Summary: core.internal.convert.toUbyte doesn't work on enums Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody@puremagic.com Reporter: n8sh.secondary@hotmail.com Problem demonstrated: ``` void main() { import core.internal.convert : toUbyte; enum Month : uint { jan = 1} Month m = Month.jan; const bytes = toUbyte(m); // Doesn't compile. } ``` -- |
Copyright © 1999-2021 by the D Language Foundation