Bug 24095 – std.bitmanip.bitfields no longer works with bool enum types

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-08-22T00:24:14Z
Last change time
2024-11-17T01:03:57Z
Keywords
pull
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2023-08-22T00:24:14Z
``` 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
Comment #1 by dlang-bot — 2024-08-06T12:50:38Z
@RubyTheRoobster updated dlang/phobos pull request #9043 "Issue 24095 - std.bitmanip.bitfields no longer works with bool enum t…" fixing this issue: - Fix Bugzilla Issue 24095 - std.bitmanip.bitfields no longer works with bool enum types https://github.com/dlang/phobos/pull/9043
Comment #2 by dlang-bot — 2024-08-19T12:05:42Z
dlang/phobos pull request #9043 "Issue 24095 - std.bitmanip.bitfields no longer works with bool enum t…" was merged into stable: - b795df6df278e9647e4f4967bcd6c694e3a76263 by RubyTheRoobster: Fix Bugzilla Issue 24095 - std.bitmanip.bitfields no longer works with bool enum types https://github.com/dlang/phobos/pull/9043
Comment #3 by dlang-bot — 2024-11-17T01:03:57Z
dlang/phobos pull request #9086 "Merge stable" was merged into master: - cd026126dbb0537cd98a6b78f8c6b726ecf75be2 by RubyTheRoobster: Issue 24095 - std.bitmanip.bitfields no longer works with bool enum t… (#9043) * Fix Bugzilla Issue 24095 - std.bitmanip.bitfields no longer works with bool enum types * Fix trailing whitespace * Remove extra space https://github.com/dlang/phobos/pull/9086