mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
12 lines
229 B
Nim
12 lines
229 B
Nim
# 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()
|