diff options
author | Aman Gupta <aman@tmm1.net> | 2015-09-28 14:34:36 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-09-28 14:34:36 -0700 |
commit | 5e9ce88dafbaa0bf72a7c7c3ce11a8d827ab3200 (patch) | |
tree | 722917ba0aba672d40faeebe72d6034c49e9f15f /tests | |
parent | bb7604c06fb2adc6999d47fdfcbf9cf2979bef9e (diff) | |
download | Nim-5e9ce88dafbaa0bf72a7c7c3ce11a8d827ab3200.tar.gz |
implement bitsize pragma for bitfields
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pragmas/tbitsize.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pragmas/tbitsize.nim b/tests/pragmas/tbitsize.nim new file mode 100644 index 000000000..d2c646ef7 --- /dev/null +++ b/tests/pragmas/tbitsize.nim @@ -0,0 +1,7 @@ +type + bits* = object + flag* {.bitsize: 1.}: cint + opts* {.bitsize: 4.}: cint + +var b: bits +echo b.flag |