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
|
|
@ -2,12 +2,12 @@
|
|||
# for recursive methods works, no code is being executed
|
||||
|
||||
type
|
||||
Obj = ref object of TObject
|
||||
Obj = ref object of RootObj
|
||||
|
||||
# Mutual recursion
|
||||
|
||||
method alpha(x: Obj)
|
||||
method beta(x: Obj)
|
||||
method alpha(x: Obj) {.base.}
|
||||
method beta(x: Obj) {.base.}
|
||||
|
||||
method alpha(x: Obj) =
|
||||
beta(x)
|
||||
|
|
@ -17,6 +17,6 @@ method beta(x: Obj) =
|
|||
|
||||
# Simple recursion
|
||||
|
||||
method gamma(x: Obj) =
|
||||
method gamma(x: Obj) {.base.} =
|
||||
gamma(x)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue