cString => cSourceString; tyCString => tyCstring so that error msgs show cstring, not cString (#17744)

This commit is contained in:
Timothee Cour 2021-04-17 02:14:09 -07:00 • committed by GitHub
commit 7e94420847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 79 additions and 79 deletions

View file

@ -375,7 +375,7 @@ proc semLowHigh(c: PContext, n: PNode, m: TMagic): PNode =
n[1] = semExprWithType(c, n[1], {efDetermineType})
var typ = skipTypes(n[1].typ, abstractVarRange + {tyTypeDesc, tyUserTypeClassInst})
case typ.kind
of tySequence, tyString, tyCString, tyOpenArray, tyVarargs:
of tySequence, tyString, tyCstring, tyOpenArray, tyVarargs:
n.typ = getSysType(c.graph, n.info, tyInt)
of tyArray:
n.typ = typ[0] # indextype
@ -1508,7 +1508,7 @@ proc semSubscript(c: PContext, n: PNode, flags: TExprFlags): PNode =
arr = arr.base
case arr.kind
of tyArray, tyOpenArray, tyVarargs, tySequence, tyString, tyCString,
of tyArray, tyOpenArray, tyVarargs, tySequence, tyString, tyCstring,
tyUncheckedArray:
if n.len != 2: return nil
n[0] = makeDeref(n[0])