summary refs log blame commit diff stats
path: root/tests/method/temptybody.nim
blob: aad945f81a9f8cfe1e2e47735177ffc6a93e4a96 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                    
                                           





                                             
# bug #2401

type MyClass = ref object of RootObj

method HelloWorld*(obj: MyClass) {.base.} =
  when defined(myPragma):
    echo("Hello World")
  # discard # with this line enabled it works

var obj = MyClass()
obj.HelloWorld()