Revert localErrorNode param order changes (#17809)
* Revert localErrorNode param order changes * Remove unused globalError overload * heh
This commit is contained in:
parent
7c64e49d45
commit
80389b8053
5 changed files with 20 additions and 13 deletions
|
|
@ -229,12 +229,12 @@ proc semBindSym(c: PContext, n: PNode): PNode =
|
|||
|
||||
let sl = semConstExpr(c, n[1])
|
||||
if sl.kind notin {nkStrLit, nkRStrLit, nkTripleStrLit}:
|
||||
return localErrorNode(c, n, errStringLiteralExpected, n[1].info)
|
||||
return localErrorNode(c, n, n[1].info, errStringLiteralExpected)
|
||||
|
||||
let isMixin = semConstExpr(c, n[2])
|
||||
if isMixin.kind != nkIntLit or isMixin.intVal < 0 or
|
||||
isMixin.intVal > high(TSymChoiceRule).int:
|
||||
return localErrorNode(c, n, errConstExprExpected, n[2].info)
|
||||
return localErrorNode(c, n, n[2].info, errConstExprExpected)
|
||||
|
||||
let id = newIdentNode(getIdent(c.cache, sl.strVal), n.info)
|
||||
let s = qualifiedLookUp(c, id, {checkUndeclared})
|
||||
|
|
@ -251,10 +251,10 @@ proc semBindSym(c: PContext, n: PNode): PNode =
|
|||
|
||||
proc opBindSym(c: PContext, scope: PScope, n: PNode, isMixin: int, info: PNode): PNode =
|
||||
if n.kind notin {nkStrLit, nkRStrLit, nkTripleStrLit, nkIdent}:
|
||||
return localErrorNode(c, n, errStringOrIdentNodeExpected, info.info)
|
||||
return localErrorNode(c, n, info.info, errStringOrIdentNodeExpected)
|
||||
|
||||
if isMixin < 0 or isMixin > high(TSymChoiceRule).int:
|
||||
return localErrorNode(c, n, errConstExprExpected, info.info)
|
||||
return localErrorNode(c, n, info.info, errConstExprExpected)
|
||||
|
||||
let id = if n.kind == nkIdent: n
|
||||
else: newIdentNode(getIdent(c.cache, n.strVal), info.info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue