Deprecated laxStrings for mutating the internal zero terminator on strings and its Deprecated code cleaned out (#14766)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
parent
c3459c7b14
commit
28510a9da9
7 changed files with 4 additions and 9 deletions
|
|
@ -482,8 +482,6 @@ proc foldArrayAccess(m: PSym, n: PNode; g: ModuleGraph): PNode =
|
|||
result = newNodeIT(nkCharLit, x.info, n.typ)
|
||||
if idx >= 0 and idx < x.strVal.len:
|
||||
result.intVal = ord(x.strVal[int(idx)])
|
||||
elif idx == x.strVal.len and optLaxStrings in g.config.options:
|
||||
discard
|
||||
else:
|
||||
localError(g.config, n.info, formatErrorIndexBound(idx, x.strVal.len-1) & $n)
|
||||
else: discard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue