parent
82870e0737
commit
5fb40af57e
2 changed files with 19 additions and 5 deletions
|
|
@ -942,10 +942,8 @@ proc semAnyRef(c: PContext; n: PNode; kind: TTypeKind; prev: PType): PType =
|
||||||
t.rawAddSonNoPropagationOfTypeFlags result
|
t.rawAddSonNoPropagationOfTypeFlags result
|
||||||
result = t
|
result = t
|
||||||
else: discard
|
else: discard
|
||||||
#if result.kind == tyRef and c.config.selectedGC == gcDestructors:
|
if result.kind == tyRef and c.config.selectedGC in {gcArc, gcOrc}:
|
||||||
# result.flags.incl tfHasAsgn
|
result.flags.incl tfHasAsgn
|
||||||
# XXX Something like this is a good idea but it should be done
|
|
||||||
# in sempass2!
|
|
||||||
|
|
||||||
proc findEnforcedStaticType(t: PType): PType =
|
proc findEnforcedStaticType(t: PType): PType =
|
||||||
# This handles types such as `static[T] and Foo`,
|
# This handles types such as `static[T] and Foo`,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ discard """
|
||||||
123xyzabc
|
123xyzabc
|
||||||
destroyed: false
|
destroyed: false
|
||||||
destroyed: false
|
destroyed: false
|
||||||
|
1
|
||||||
closed
|
closed
|
||||||
destroying variable
|
destroying variable
|
||||||
'''
|
'''
|
||||||
|
|
@ -118,4 +119,19 @@ proc free*(game: Game) =
|
||||||
proc newGame*(): Game =
|
proc newGame*(): Game =
|
||||||
new(result, free)
|
new(result, free)
|
||||||
|
|
||||||
var game*: Game
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue