(cherry picked from commit 296b2789b5)
This commit is contained in:
Yuriy Glukhov
2026-02-06 00:54:04 +01:00
committed by narimiran
parent 9fa69d222f
commit 2ddeabceaf
3 changed files with 42 additions and 26 deletions

16
tests/typerel/t25340.nim Normal file
View File

@@ -0,0 +1,16 @@
type
Foo[T] = object of T
template inheritanceCheck(a, b: untyped) =
doAssert a is b
doAssert b isnot a
inheritanceCheck Foo[RootObj], RootObj
inheritanceCheck Foo[Foo[RootObj]], RootObj
inheritanceCheck Foo[Foo[RootObj]], Foo[RootObj]
inheritanceCheck Foo[Foo[Foo[RootObj]]], RootObj
inheritanceCheck Foo[Foo[Foo[RootObj]]], Foo[RootObj]
inheritanceCheck Foo[Foo[Foo[RootObj]]], Foo[Foo[RootObj]]