mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
25 lines
335 B
Nim
25 lines
335 B
Nim
discard """
|
|
action: compile
|
|
"""
|
|
|
|
# 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
|
|
|
|
proc foo[T2](a: Wrapped[T2]) =
|
|
# Error: generic instantiation too nested
|
|
discard $a
|
|
|
|
foo(result)
|