fixes #5479
This commit is contained in:
parent
f673fbd91f
commit
7ac1e6e528
3 changed files with 31 additions and 9 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue