www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Bitfield woes

reply SealabJaster <sealabjaster gmail.com> writes:
I swear I'm not being stupid right: https://run.dlang.io/is/Wfd214

I should be seeing:

```
7 // 111
7 // 111
3 // 11
[no error message]
```

instead of:

```
3 // 11
3 // 11
1 // 1
core.exception.AssertError onlineapp.d-mixin-8(9): Value is 
greater than the maximum value of bitfield 'a'
```

Or am I managing to miss something completely obvious?
Aug 15 2021
parent SealabJaster <sealabjaster gmail.com> writes:
On Monday, 16 August 2021 at 06:47:54 UTC, SealabJaster wrote:
...
Wait, I'm actually just a moron. I should be using `uint` and not `int`
Aug 15 2021