[Issue 24095] New: std.bitmanip.bitfields no longer works with bool enum types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 22 00:24:14 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24095
Issue ID: 24095
Summary: std.bitmanip.bitfields no longer works with bool enum
types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: elpenguino+D at gmail.com
```
import std.bitmanip;
enum Bar : bool {
a,
b,
}
struct Foo {
mixin(bitfields!(
Bar, "bar", 1,
ubyte, "", 7,
));
}
```
This compiled before DMD 2.103.0. Now it produces two errors: 'Error: operation
not allowed on `bool` `result <<= 7u`' and 'Error: operation not allowed on
`bool` `result >>>= 7u`'.
This regression appears to have been introduced by
https://github.com/dlang/phobos/pull/8663
--
More information about the Digitalmars-d-bugs
mailing list