This commit is contained in:
Araq 2018-08-28 11:16:37 +02:00
commit 9c3cba1c22
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,19 @@
discard """
errormsg: "generic instantiation too nested"
file: "system.nim"
"""
# bug #4766
type
Plain = ref object
discard
Wrapped[T] = object
value: T
converter toWrapped[T](value: T): Wrapped[T] =
Wrapped[T](value: value)
let result = Plain()
discard $result