Skip to content

Commit

Permalink
better error handling for bug #3550
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Nov 18, 2015
1 parent 698b1fc commit 528cf3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/cgmeth.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 528cf3e

Please sign in to comment.