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,7 +2,7 @@ discard """
|
|||
output: "do nothing"
|
||||
"""
|
||||
|
||||
method somethin(obj: TObject) =
|
||||
method somethin(obj: RootObj) {.base.} =
|
||||
echo "do nothing"
|
||||
|
||||
type
|
||||
|
|
@ -14,9 +14,9 @@ type
|
|||
TSomethingElse = object
|
||||
PSomethingElse = ref TSomethingElse
|
||||
|
||||
method foo(a: PNode, b: PSomethingElse) = discard
|
||||
method foo(a: PNode, b: PSomethingElse) {.base.} = discard
|
||||
method foo(a: PNodeFoo, b: PSomethingElse) = discard
|
||||
|
||||
var o: TObject
|
||||
var o: RootObj
|
||||
o.somethin()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue