fixes #2590; methods now require a .base annotation
This commit is contained in:
parent
d2e4d6ad82
commit
dc047931bb
17 changed files with 69 additions and 32 deletions
|
|
@ -11,7 +11,7 @@ type
|
|||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue