summary refs log tree commit diff stats
path: root/tests/method/tmethods1.nim
blob: f4add6af454e24f247e85290218ef569b565c1ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()