cString => cSourceString; tyCString => tyCstring so that error msgs show cstring, not cString (#17744)
This commit is contained in:
parent
8e474fbb57
commit
7e94420847
32 changed files with 79 additions and 79 deletions
|
|
@ -95,7 +95,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
|
|||
of tyTuple:
|
||||
if v.len == 2:
|
||||
strVal = v[1] # second tuple part is the string value
|
||||
if skipTypes(strVal.typ, abstractInst).kind in {tyString, tyCString}:
|
||||
if skipTypes(strVal.typ, abstractInst).kind in {tyString, tyCstring}:
|
||||
if not isOrdinalType(v[0].typ, allowEnumWithHoles=true):
|
||||
localError(c.config, v[0].info, errOrdinalTypeExpected & "; given: " & typeToString(v[0].typ, preferDesc))
|
||||
x = toInt64(getOrdValue(v[0])) # first tuple part is the ordinal
|
||||
|
|
@ -104,7 +104,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
|
|||
localError(c.config, strVal.info, errStringLiteralExpected)
|
||||
else:
|
||||
localError(c.config, v.info, errWrongNumberOfVariables)
|
||||
of tyString, tyCString:
|
||||
of tyString, tyCstring:
|
||||
strVal = v
|
||||
x = counter
|
||||
else:
|
||||
|
|
@ -2037,7 +2037,7 @@ proc processMagicType(c: PContext, m: PSym) =
|
|||
if optSeqDestructors in c.config.globalOptions:
|
||||
incl m.typ.flags, tfHasAsgn
|
||||
of mCstring:
|
||||
setMagicIntegral(c.config, m, tyCString, c.config.target.ptrSize)
|
||||
setMagicIntegral(c.config, m, tyCstring, c.config.target.ptrSize)
|
||||
rawAddSon(m.typ, getSysType(c.graph, m.info, tyChar))
|
||||
of mPointer: setMagicIntegral(c.config, m, tyPointer, c.config.target.ptrSize)
|
||||
of mNil: setMagicType(c.config, m, tyNil, c.config.target.ptrSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue