summary refs log blame commit diff stats
path: root/tests/method/tmethods1.nim
blob: cb4da5ef2b56fed8a59381100339e39482d3b384 (plain) (tree)
1
2
3
4
5
6
7



                      
                                        

                   





                                 
                         

                                     
                                                          
                                                    
 
              

            
discard """
  output: "do nothing"
"""

method somethin(obj: RootObj) {.base.} =
  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) {.base.} = discard
method foo(a: PNodeFoo, b: PSomethingElse) = discard

var o: RootObj
o.somethin()