diff options
Diffstat (limited to 'tests/method/tmproto.nim')
-rw-r--r-- | tests/method/tmproto.nim | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/method/tmproto.nim b/tests/method/tmproto.nim deleted file mode 100644 index 087666ea0..000000000 --- a/tests/method/tmproto.nim +++ /dev/null @@ -1,25 +0,0 @@ -type - Obj1 = ref object {.inheritable.} - Obj2 = ref object of Obj1 - -method beta(x: Obj1): int {.base.} - -proc delta(x: Obj2): int = - beta(x) - -method beta(x: Obj2): int - -proc alpha(x: Obj1): int = - beta(x) - -method beta(x: Obj1): int = 1 -method beta(x: Obj2): int = 2 - -proc gamma(x: Obj1): int = - beta(x) - -doAssert alpha(Obj1()) == 1 -doAssert gamma(Obj1()) == 1 -doAssert alpha(Obj2()) == 2 -doAssert gamma(Obj2()) == 2 -doAssert delta(Obj2()) == 2 |