fixes #5467
This commit is contained in:
parent
4a77b66b19
commit
3fa428c88b
3 changed files with 34 additions and 2 deletions
|
|
@ -851,7 +851,11 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
|
|||
put(g, tkRStrLit, '\"' & replace(n[1].strVal, "\"", "\"\"") & '\"')
|
||||
else:
|
||||
gsub(g, n.sons[1])
|
||||
of nkHiddenStdConv, nkHiddenSubConv, nkHiddenCallConv: gsub(g, n.sons[1])
|
||||
of nkHiddenStdConv, nkHiddenSubConv, nkHiddenCallConv:
|
||||
if n.len >= 2:
|
||||
gsub(g, n.sons[1])
|
||||
else:
|
||||
put(g, tkSymbol, "(wrong conv)")
|
||||
of nkCast:
|
||||
put(g, tkCast, "cast")
|
||||
put(g, tkBracketLe, "[")
|
||||
|
|
|
|||
|
|
@ -2324,12 +2324,16 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
|||
of nkIfExpr, nkIfStmt: result = semIf(c, n)
|
||||
of nkHiddenStdConv, nkHiddenSubConv, nkConv, nkHiddenCallConv:
|
||||
checkSonsLen(n, 2)
|
||||
considerGenSyms(c, n)
|
||||
of nkStringToCString, nkCStringToString, nkObjDownConv, nkObjUpConv:
|
||||
checkSonsLen(n, 1)
|
||||
considerGenSyms(c, n)
|
||||
of nkChckRangeF, nkChckRange64, nkChckRange:
|
||||
checkSonsLen(n, 3)
|
||||
considerGenSyms(c, n)
|
||||
of nkCheckedFieldExpr:
|
||||
checkMinSonsLen(n, 2)
|
||||
considerGenSyms(c, n)
|
||||
of nkTableConstr:
|
||||
result = semTableConstr(c, n)
|
||||
of nkClosedSymChoice, nkOpenSymChoice:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue