mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
@@ -1863,11 +1863,11 @@ proc implicitConv(kind: TNodeKind, f: PType, arg: PNode, m: TCandidate,
|
||||
result = newNodeI(kind, arg.info)
|
||||
if containsGenericType(f):
|
||||
if not m.hasFauxMatch:
|
||||
result.typ = getInstantiatedType(c, arg, m, f)
|
||||
result.typ = getInstantiatedType(c, arg, m, f).skipTypes({tySink})
|
||||
else:
|
||||
result.typ = errorType(c)
|
||||
else:
|
||||
result.typ = f
|
||||
result.typ = f.skipTypes({tySink})
|
||||
if result.typ == nil: internalError(c.graph.config, arg.info, "implicitConv")
|
||||
result.add c.graph.emptyNode
|
||||
result.add arg
|
||||
|
||||
@@ -100,4 +100,18 @@ mkManyLeaks()
|
||||
tsimpleClosureIterator()
|
||||
tleakingNewStmt()
|
||||
leakObjConstr()
|
||||
|
||||
# bug #12964
|
||||
|
||||
type
|
||||
Token* = ref object of RootObj
|
||||
Li* = ref object of Token
|
||||
|
||||
proc bug12964*() =
|
||||
var token = Li()
|
||||
var tokens = @[Token()]
|
||||
tokens.add token
|
||||
|
||||
bug12964()
|
||||
|
||||
echo getOccupiedMem() - startMem
|
||||
|
||||
Reference in New Issue
Block a user