* fixes #21260; add check for illegal recursion for defaults * fixes differently
This commit is contained in:
parent
c4035d7f7c
commit
fc35f83eee
5 changed files with 38 additions and 30 deletions
13
tests/types/t21260.nim
Normal file
13
tests/types/t21260.nim
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue