implement sizeof and alignof operator (manually squashed #5664) (#9356)

This commit is contained in:
Timothee Cour 2018-10-13 15:52:28 -07:00 • committed by Andreas Rumpf
commit 745f1642d6
18 changed files with 906 additions and 236 deletions

11
tests/misc/tsizeof2.nim Normal file
View file

@ -0,0 +1,11 @@
discard """
errormsg: "cannot evaluate 'sizeof/alignof' because its type is not defined completely"
line: 9
"""
type
MyStruct {.importc: "MyStruct".} = object
const i = sizeof(MyStruct)
echo i