diff options
Diffstat (limited to 'tests/destructor/objFile.nim')
-rw-r--r-- | tests/destructor/objFile.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/destructor/objFile.nim b/tests/destructor/objFile.nim new file mode 100644 index 000000000..436c090d1 --- /dev/null +++ b/tests/destructor/objFile.nim @@ -0,0 +1,8 @@ +type Obj* = object + v*: int + +proc `=destroy`(this: var Obj) = + echo "igotdestroyed" + this.v = -1 + +var test* = Obj(v: 42) |