better error handling for bug #3550
This commit is contained in:
parent
698b1fc954
commit
528cf3eae4
1 changed files with 2 additions and 2 deletions
|
|
@ -23,8 +23,8 @@ proc genConv(n: PNode, d: PType, downcast: bool): PNode =
|
||||||
# how the real fix looks like:
|
# how the real fix looks like:
|
||||||
localError(n.info, "there is no subtype relation between " &
|
localError(n.info, "there is no subtype relation between " &
|
||||||
typeToString(d) & " and " & typeToString(n.typ))
|
typeToString(d) & " and " & typeToString(n.typ))
|
||||||
#internalError(n.info, "cgmeth.genConv")
|
result = n
|
||||||
if diff < 0:
|
elif diff < 0:
|
||||||
result = newNodeIT(nkObjUpConv, n.info, d)
|
result = newNodeIT(nkObjUpConv, n.info, d)
|
||||||
addSon(result, n)
|
addSon(result, n)
|
||||||
if downcast: internalError(n.info, "cgmeth.genConv: no upcast allowed")
|
if downcast: internalError(n.info, "cgmeth.genConv: no upcast allowed")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue