mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
better error handling for bug #3550
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user