mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
23 lines
405 B
Nim
23 lines
405 B
Nim
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()
|
|
|