Use typeflag instead
This commit is contained in:
parent
26a867c83c
commit
b022576ce9
11 changed files with 29 additions and 18 deletions
|
|
@ -1240,7 +1240,7 @@ proc rawGenNew(p: BProc, a: var TLoc, sizeExpr: Rope; needsInit: bool) =
|
|||
# the prototype of a destructor is ``=destroy(x: var T)`` and that of a
|
||||
# finalizer is: ``proc (x: ref T) {.nimcall.}``. We need to check the calling
|
||||
# convention at least:
|
||||
if bt.destructor.typ == nil or bt.destructor.typ.callConv notin ccDefault:
|
||||
if bt.destructor.typ == nil or bt.destructor.typ.callConv != ccNimCall:
|
||||
localError(p.module.config, a.lode.info,
|
||||
"the destructor that is turned into a finalizer needs " &
|
||||
"to have the 'nimcall' calling convention")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue