diff options
Diffstat (limited to 'tests/method/tmultim1.nim')
-rw-r--r-- | tests/method/tmultim1.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/method/tmultim1.nim b/tests/method/tmultim1.nim index 7f551aa64..010468a5b 100644 --- a/tests/method/tmultim1.nim +++ b/tests/method/tmultim1.nim @@ -10,15 +10,15 @@ type x: int PlusExpr = ref object of Expression a, b: Expression - -method eval(e: Expression): int = quit "to override!" + +method eval(e: Expression): int {.base.} = quit "to override!" method eval(e: Literal): int = return e.x method eval(e: PlusExpr): int = return eval(e.a) + eval(e.b) proc newLit(x: int): Literal = new(result) result.x = x - + proc newPlus(a, b: Expression): PlusExpr = new(result) result.a = a |