From 2a8c759df0e8a952f7cbea8539e3fb7aa234795a Mon Sep 17 00:00:00 2001 From: SirOlaf <34164198+SirOlaf@users.noreply.github.com> Date: Fri, 8 Sep 2023 06:50:39 +0200 Subject: 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 Co-authored-by: SirOlaf <> --- tests/generics/t21742.nim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/generics/t21742.nim (limited to 'tests/generics/t21742.nim') 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 -- cgit 1.4.1-2-gfad0