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:
|
||||
localError(n.info, "there is no subtype relation between " &
|
||||
typeToString(d) & " and " & typeToString(n.typ))
|
||||
#internalError(n.info, "cgmeth.genConv")
|
||||
if diff < 0:
|
||||
result = n
|
||||
elif diff < 0:
|
||||
result = newNodeIT(nkObjUpConv, n.info, d)
|
||||
addSon(result, n)
|
||||
if downcast: internalError(n.info, "cgmeth.genConv: no upcast allowed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue