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
|
|
@ -260,7 +260,7 @@ proc sumGeneric(t: PType): int =
|
|||
of tyGenericParam, tyUntyped, tyTyped: break
|
||||
of tyAlias, tySink: t = t.lastSon
|
||||
of tyBool, tyChar, tyEnum, tyObject, tyPointer,
|
||||
tyString, tyCString, tyInt..tyInt64, tyFloat..tyFloat128,
|
||||
tyString, tyCstring, tyInt..tyInt64, tyFloat..tyFloat128,
|
||||
tyUInt..tyUInt64, tyCompositeTypeClass:
|
||||
return isvar
|
||||
else:
|
||||
|
|
@ -1383,7 +1383,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
|||
# 'pointer' is NOT compatible to regionized pointers
|
||||
# so 'dealloc(regionPtr)' fails:
|
||||
if a.len == 1: result = isConvertible
|
||||
of tyCString: result = isConvertible
|
||||
of tyCstring: result = isConvertible
|
||||
else: discard
|
||||
of tyString:
|
||||
case a.kind
|
||||
|
|
@ -1394,10 +1394,10 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
|||
result = isEqual
|
||||
of tyNil: result = isNone
|
||||
else: discard
|
||||
of tyCString:
|
||||
of tyCstring:
|
||||
# conversion from string to cstring is automatic:
|
||||
case a.kind
|
||||
of tyCString:
|
||||
of tyCstring:
|
||||
if tfNotNil in f.flags and tfNotNil notin a.flags:
|
||||
result = isNilConversion
|
||||
else:
|
||||
|
|
@ -2436,7 +2436,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode, m: var TCandidate, marker: var Int
|
|||
n[a] = prepareOperand(c, n[a])
|
||||
if skipTypes(n[a].typ, abstractVar-{tyTypeDesc}).kind==tyString:
|
||||
m.call.add implicitConv(nkHiddenStdConv,
|
||||
getSysType(c.graph, n[a].info, tyCString),
|
||||
getSysType(c.graph, n[a].info, tyCstring),
|
||||
copyTree(n[a]), m, c)
|
||||
else:
|
||||
m.call.add copyTree(n[a])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue