diff options
Diffstat (limited to 'tests/errmsgs/tnested_generic_instantiation.nim')
-rw-r--r-- | tests/errmsgs/tnested_generic_instantiation.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/errmsgs/tnested_generic_instantiation.nim b/tests/errmsgs/tnested_generic_instantiation.nim new file mode 100644 index 000000000..6aea7cbcc --- /dev/null +++ b/tests/errmsgs/tnested_generic_instantiation.nim @@ -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 |