diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-01-18 18:52:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 11:52:18 +0100 |
commit | fc35f83eee55610af3931f95771b6d1bce1fc845 (patch) | |
tree | ff4314e15cfb5405160c45a0afa67b9033de0be2 /tests | |
parent | c4035d7f7c424caa81ee449d2032ecd8e8967ebd (diff) | |
download | Nim-fc35f83eee55610af3931f95771b6d1bce1fc845.tar.gz |
fixes #21260; add check for illegal recursion for defaults (#21270)
* fixes #21260; add check for illegal recursion for defaults * fixes differently
Diffstat (limited to 'tests')
-rw-r--r-- | tests/types/t21260.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/types/t21260.nim b/tests/types/t21260.nim new file mode 100644 index 000000000..90d6613c1 --- /dev/null +++ b/tests/types/t21260.nim @@ -0,0 +1,13 @@ +discard """ + errormsg: "illegal recursion in type 'Foo'" + line: 8 +""" + +type + Kind = enum kA, kB + Foo = object + case k: Kind: + of kA: + foo: Foo + of kB: + discard |