mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
12 lines
220 B
Nim
12 lines
220 B
Nim
# 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()
|