fixes #2590; methods now require a .base annotation

This commit is contained in:
Araq 2015-09-06 02:29:30 +02:00
commit dc047931bb
17 changed files with 69 additions and 32 deletions

View file

@ -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()