Files
Nim/tests/method/tmethods1.nim
2014-01-13 02:10:03 +01:00

23 lines
380 B
Nim

discard """
output: "do nothing"
"""
method somethin(obj: TObject) =
echo "do nothing"
type
TNode* = object {.inheritable.}
PNode* = ref TNode
PNodeFoo* = ref object of TNode
TSomethingElse = object
PSomethingElse = ref TSomethingElse
method foo(a: PNode, b: PSomethingElse) = nil
method foo(a: PNodeFoo, b: PSomethingElse) = nil
var o: TObject
o.somethin()