summary refs log tree commit diff stats
path: root/tests/errmsgs/tnested_generic_instantiation.nim
blob: 6aea7cbcc3217e190a07538c52b41b0b9f6470be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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