fixes #23505; fixes injectdestructors errors on transformed addr (deref) refs (#23507)

fixes #23505

(cherry picked from commit acd4c8a353)
This commit is contained in:
ringabout
2024-04-18 17:57:44 +08:00
committed by narimiran
parent 59e49ded2d
commit dbbd2c8002
2 changed files with 16 additions and 1 deletions

View File

@@ -688,3 +688,15 @@ block: # bug #22259
f(wrapper)
main()
block: # bug #23505
type
K = object
C = object
value: ptr K
proc init(T: type C): C =
let tmp = new K
C(value: addr tmp[])
discard init(C)