diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2019-02-10 22:07:51 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-10 22:07:50 +0100 |
commit | 5fd9bf9cd52a19b0ddd59452d9ebde0715d7d890 (patch) | |
tree | 90458afdcb7e0895f348929bb9ce97f606a0018d /tests/generics | |
parent | 491060839473fbe5fa17b4fd37b93f5dcc662db8 (diff) | |
download | Nim-5fd9bf9cd52a19b0ddd59452d9ebde0715d7d890.tar.gz |
Propagate tfGcSafe flag to generic instantiations (#10620)
Fixes a nasty endless loop in the generic instantiation phase.
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/tgenerics_various.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/generics/tgenerics_various.nim b/tests/generics/tgenerics_various.nim index 9e6186534..656bfa566 100644 --- a/tests/generics/tgenerics_various.nim +++ b/tests/generics/tgenerics_various.nim @@ -242,3 +242,14 @@ block tvarargs_vs_generics: withDirectType "string" withOpenArray "string" withVarargs "string" + +block: + type + Que[T] {.gcsafe.} = object + x: T + + proc `=`[T](q: var Que[T]; x: Que[T]) = + discard + + var x: Que[int] + doAssert(x.x == 0) |