improve the error message for mutability problems
This commit is contained in:
parent
f3b8d92216
commit
037ce16f44
2 changed files with 8 additions and 2 deletions
|
|
@ -474,7 +474,7 @@ proc newHiddenAddrTaken(c: PContext, n: PNode): PNode =
|
|||
result = newNodeIT(nkHiddenAddr, n.info, makeVarType(c, n.typ))
|
||||
addSon(result, n)
|
||||
if isAssignable(c, n) notin {arLValue, arLocalLValue}:
|
||||
localError(n.info, errVarForOutParamNeededX, $n)
|
||||
localError(n.info, errVarForOutParamNeededX, renderNotLValue(n))
|
||||
|
||||
proc analyseIfAddressTaken(c: PContext, n: PNode): PNode =
|
||||
result = n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue