diff options
author | SirOlaf <34164198+SirOlaf@users.noreply.github.com> | 2023-09-08 06:50:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 06:50:39 +0200 |
commit | 2a8c759df0e8a952f7cbea8539e3fb7aa234795a (patch) | |
tree | 4c8215e18d8c927eb6d658d921ab2b28ecfb43be /tests/generics/t21742.nim | |
parent | ee4a219012ca1fcb2cfb2cce4e87ff6774009d86 (diff) | |
download | Nim-2a8c759df0e8a952f7cbea8539e3fb7aa234795a.tar.gz |
Fix #21742: Check generic alias depth before skip (#22443)
Close #21742 Checking if there's any side-effects and if just changing typeRel is adequate for this issue before trying to look into related ones. `skipBoth` is also not that great, it can lead to code that works sometimes but fails when the proc is instantiated with branching aliases. This is mostly an issue with error clarity though. --------- Co-authored-by: SirOlaf <unknown> Co-authored-by: SirOlaf <>
Diffstat (limited to 'tests/generics/t21742.nim')
-rw-r--r-- | tests/generics/t21742.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/generics/t21742.nim b/tests/generics/t21742.nim new file mode 100644 index 000000000..c49c8ee97 --- /dev/null +++ b/tests/generics/t21742.nim @@ -0,0 +1,10 @@ +type + Foo[T] = object + x:T + Bar[T,R] = Foo[T] + Baz = Bar[int,float] + +proc qux[T,R](x: Bar[T,R]) = discard + +var b:Baz +b.qux() \ No newline at end of file |