mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-23 07:45:23 +00:00
* fixes #18983 #5282 #13008; recursive types casue infinite type
* re
* add testcases
(cherry picked from commit a895bbf714)
This commit is contained in:
7
tests/errmsgs/t18983.nim
Normal file
7
tests/errmsgs/t18983.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
errormsg: "illegal recursion in type 'A'"
|
||||
"""
|
||||
|
||||
type
|
||||
A* = A
|
||||
B = (A,)
|
||||
5
tests/errmsgs/t5282.nim
Normal file
5
tests/errmsgs/t5282.nim
Normal file
@@ -0,0 +1,5 @@
|
||||
discard """
|
||||
errormsg: "illegal recursion in type 'x'"
|
||||
"""
|
||||
|
||||
type x = distinct x
|
||||
Reference in New Issue
Block a user