correctly backport #14496

This commit is contained in:
narimiran
2020-06-01 13:38:04 +02:00
parent 97c68d9446
commit 957e74e99e

View File

@@ -3,7 +3,6 @@ discard """
123xyzabc
destroyed: false
destroyed: false
1
(x: "0")
(x: "1")
(x: "2")
@@ -103,50 +102,6 @@ assert n.sortedByIt(it) == @["b", "c"], "fine"
assert q.sortedByIt(it[0]) == @[("b", "1"), ("c", "2")], "fails under arc"
#------------------------------------------------------------------------------
# issue #14236
type
MyType = object
a: seq[int]
proc re(x: static[string]): static MyType =
MyType()
proc match(inp: string, rg: static MyType) =
doAssert rg.a.len == 0
match("ac", re"a(b|c)")
#------------------------------------------------------------------------------
# issue #14243
type
Game* = ref object
proc free*(game: Game) =
let a = 5
proc newGame*(): Game =
new(result, free)
var game*: Game
#------------------------------------------------------------------------------
# issue #14333
type
SimpleLoop = object
Lsg = object
loops: seq[ref SimpleLoop]
root: ref SimpleLoop
var lsg: Lsg
lsg.loops.add lsg.root
echo lsg.loops.len
# bug #14495
type
Gah = ref object