diff options
-rw-r--r-- | compiler/cgmeth.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim index de26a4390..ade202dc1 100644 --- a/compiler/cgmeth.nim +++ b/compiler/cgmeth.nim @@ -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") |