mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 23:54:19 +00:00
fixes #3038
This commit is contained in:
28
tests/objects/trefobjsyntax3.nim
Normal file
28
tests/objects/trefobjsyntax3.nim
Normal file
@@ -0,0 +1,28 @@
|
||||
# bug #2540
|
||||
|
||||
type
|
||||
BaseSceneNode[T] = ref object of RootObj
|
||||
children*: seq[BaseSceneNode[T]]
|
||||
parent*: BaseSceneNode[T]
|
||||
|
||||
SceneNode[T] = ref object of BaseSceneNode[T]
|
||||
|
||||
SomeObj = ref object
|
||||
|
||||
proc newSceneNode[T](): SceneNode[T] =
|
||||
new result
|
||||
result.children = @[]
|
||||
|
||||
var aNode = newSceneNode[SomeObj]()
|
||||
|
||||
|
||||
# bug #3038
|
||||
|
||||
type
|
||||
Data[T] = ref object of RootObj
|
||||
data: T
|
||||
Type = ref object of RootObj
|
||||
SubType[T] = ref object of Type
|
||||
data: Data[T]
|
||||
SubSubType = ref object of SubType
|
||||
SubSubSubType = ref object of SubSubType
|
||||
Reference in New Issue
Block a user