fixes #20516; system.create doesn't work with bitfield objects (#20518)

* Revert "fixes #19000 (#19032)"

This reverts commit 2bda4a30a6.

* fixes #20516; add testcase
This commit is contained in:
ringabout 2022-10-08 23:38:22 +08:00 • committed by GitHub
commit 5e4dd571d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -162,3 +162,10 @@ block:
reset(y)
doAssert y.b == {}
block: # bug #20516
type Foo = object
x {.bitsize:4.}: uint
y {.bitsize:4.}: uint
when not defined(js):
let a = create(Foo)