Offsetof fixes (#11690)
* first fixes * more tests and fixes * code normalization
This commit is contained in:
parent
b50ae6817a
commit
11dad688fe
8 changed files with 241 additions and 81 deletions
|
|
@ -1310,8 +1310,12 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
|
|||
# produces a value
|
||||
else:
|
||||
globalError(c.config, n.info, "expandToAst requires a call expression")
|
||||
of mSizeOf, mAlignOf:
|
||||
globalError(c.config, n.info, "cannot evaluate 'sizeof/alignof' because its type is not defined completely")
|
||||
of mSizeOf:
|
||||
globalError(c.config, n.info, "cannot evaluate 'sizeof' because its type is not defined completely")
|
||||
of mAlignOf:
|
||||
globalError(c.config, n.info, "cannot evaluate 'alignof' because its type is not defined completely")
|
||||
of mOffsetOf:
|
||||
globalError(c.config, n.info, "cannot evaluate 'offsetof' because its type is not defined completely")
|
||||
of mRunnableExamples:
|
||||
discard "just ignore any call to runnableExamples"
|
||||
of mDestroy: discard "ignore calls to the default destructor"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue