mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 20:34:21 +00:00
fixes #5479
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
discard """
|
||||
output: "wow2"
|
||||
output: '''wow2
|
||||
X 1
|
||||
X 3'''
|
||||
"""
|
||||
type
|
||||
First[T] = ref object of RootObj
|
||||
@@ -22,3 +24,18 @@ proc takeFirst(x: First[int]) =
|
||||
wow(2, x)
|
||||
|
||||
takeFirst(x)
|
||||
|
||||
|
||||
# bug #5479
|
||||
type
|
||||
Base[T: static[int]] = ref object of RootObj
|
||||
|
||||
method test[T](t: Base[T]) {.base.} =
|
||||
echo "X ", t.T
|
||||
|
||||
let ab = Base[1]()
|
||||
|
||||
ab.test()
|
||||
|
||||
let ac = Base[3]()
|
||||
ac.test()
|
||||
|
||||
Reference in New Issue
Block a user