mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
This reverts commit 1655103d83.
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
discard """
|
||||
matrix: "--gc:refc; --gc:arc"
|
||||
"""
|
||||
|
||||
# bug #16607
|
||||
|
||||
type
|
||||
O {.requiresInit.} = object
|
||||
initialized: bool
|
||||
|
||||
proc `=destroy`(o: var O) =
|
||||
doAssert o.initialized, "O was destroyed before initialization!"
|
||||
|
||||
proc initO(): O =
|
||||
O(initialized: true)
|
||||
|
||||
proc pair(): tuple[a, b: O] =
|
||||
result.a = initO()
|
||||
result.b = initO()
|
||||
|
||||
proc main() =
|
||||
discard pair()
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user