fixes #4673
This commit is contained in:
parent
f6a2ff731b
commit
3a13706d7d
19 changed files with 74 additions and 31 deletions
13
tests/objects/tinherit_from_generic.nim
Normal file
13
tests/objects/tinherit_from_generic.nim
Normal 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue