mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
14 lines
253 B
Nim
14 lines
253 B
Nim
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'
|