This commit is contained in:
Araq
2018-10-02 23:31:39 +02:00
parent f673fbd91f
commit 7ac1e6e528
3 changed files with 31 additions and 9 deletions

View File

@@ -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()