This commit is contained in:
Araq 2015-03-25 13:05:32 +01:00
commit 94f2d639b1
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,11 @@
# bug #2401
type MyClass = ref object of RootObj
method HelloWorld*(obj: MyClass) =
when defined(myPragma):
echo("Hello World")
# discard # with this line enabled it works
var obj = MyClass()
obj.HelloWorld()