fixes #3550
This commit is contained in:
parent
aad4ed776b
commit
698b1fc954
2 changed files with 7 additions and 2 deletions
|
|
@ -18,7 +18,12 @@ proc genConv(n: PNode, d: PType, downcast: bool): PNode =
|
||||||
var source = skipTypes(n.typ, abstractPtrs)
|
var source = skipTypes(n.typ, abstractPtrs)
|
||||||
if (source.kind == tyObject) and (dest.kind == tyObject):
|
if (source.kind == tyObject) and (dest.kind == tyObject):
|
||||||
var diff = inheritanceDiff(dest, source)
|
var diff = inheritanceDiff(dest, source)
|
||||||
if diff == high(int): internalError(n.info, "cgmeth.genConv")
|
if diff == high(int):
|
||||||
|
# see bug #3550 which triggers it. XXX This is a hack but I don't know yet
|
||||||
|
# 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:
|
if diff < 0:
|
||||||
result = newNodeIT(nkObjUpConv, n.info, d)
|
result = newNodeIT(nkObjUpConv, n.info, d)
|
||||||
addSon(result, n)
|
addSon(result, n)
|
||||||
|
|
|
||||||
2
todo.txt
2
todo.txt
|
|
@ -1,7 +1,7 @@
|
||||||
essential for 1.0
|
essential for 1.0
|
||||||
=================
|
=================
|
||||||
|
|
||||||
- document special cased varargs[untyped] and varargs[typed]
|
- introduce newSeqOfCap(10)
|
||||||
- The remaining bugs of the lambda lifting pass that is responsible to enable
|
- The remaining bugs of the lambda lifting pass that is responsible to enable
|
||||||
closures and closure iterators need to be fixed.
|
closures and closure iterators need to be fixed.
|
||||||
- ``concept`` needs to be refined, a nice name for the feature is not enough.
|
- ``concept`` needs to be refined, a nice name for the feature is not enough.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue