Files
Nim/tests/generics/t21742.nim
SirOlaf 2a8c759df0 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 <>
2023-09-08 06:50:39 +02:00

10 lines
130 B
Nim

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()