implements https://github.com/nim-lang/RFCs/issues/258 (#15503)
* implements https://github.com/nim-lang/RFCs/issues/258 * don't be too strict with custom pragma blocks * cast pragmas: documentation * added most missing inference query procs to effecttraits.nim
This commit is contained in:
parent
acd71dd6bb
commit
92163fa330
16 changed files with 232 additions and 68 deletions
|
|
@ -1009,6 +1009,7 @@ proc transform(c: PTransf, n: PNode): PNode =
|
|||
# Constants can be inlined here, but only if they cannot result in a cast
|
||||
# in the back-end (e.g. var p: pointer = someProc)
|
||||
let exprIsPointerCast = n.kind in {nkCast, nkConv, nkHiddenStdConv} and
|
||||
n.typ != nil and
|
||||
n.typ.kind == tyPointer
|
||||
if not exprIsPointerCast:
|
||||
var cnst = getConstExpr(c.module, result, c.graph)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue