mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 23:05:27 +00:00
correctly backport #14496
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user