This commit is contained in:
Andreas Rumpf 2016-09-01 13:01:22 +02:00
commit 3a13706d7d
19 changed files with 74 additions and 31 deletions

View file

@ -0,0 +1,13 @@
discard """
output: '''true'''
"""
# bug #4673
type
BaseObj[T] = ref object of RootObj
SomeObj = ref object of BaseObj[int]
proc doSomething[T](o: BaseObj[T]) =
echo "true"
var o = new(SomeObj)
o.doSomething() # Error: cannot instantiate: 'T'