mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* attach global destructors at end of mainModule * Add testcase * Minor cleanup * Inject topLevelVar temporaries' destructors early * Fix megatest
9 lines
124 B
Nim
9 lines
124 B
Nim
type Obj* = object
|
|
v*: int
|
|
|
|
proc `=destroy`(this: var Obj) =
|
|
echo "igotdestroyed"
|
|
this.v = -1
|
|
|
|
var test* = Obj(v: 42)
|