fixes #19231; newFinalize doesn't work with ORC (#20291)

* fixes #19231; newFinalize doesn't work with ORC

first make it pass tests

* remove the tables dep

creates a binding for finalized procs in order to handle the same symbols. It used to wrongly generat a new symbol id for the same symbol as the encountered one before

* refactor and revert #14257

* de indentation

* fixes tests; uses instantiated types
This commit is contained in:
ringabout 2022-10-05 16:35:40 +08:00 • committed by GitHub
commit 3e2b30879c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 31 deletions

18
tests/arc/t19231.nim Normal file
View file

@ -0,0 +1,18 @@
discard """
matrix: "--mm:orc"
targets: "c cpp"
"""
type
Game* = ref object
proc free*(game: Game) =
var mixNumOpened:cint = 0
for i in 0..<mixNumOpened:
mixNumOpened -= 1
proc newGame*(): Game =
new result, free
var
game*: Game