summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-08-24 01:58:50 +0800
committerGitHub <noreply@github.com>2022-08-23 19:58:50 +0200
commita895bbf714894b059361d0c63a0e46e54eb22da3 (patch)
treef47c2c1a56b1fc0fe22ad169a42397767e7357a1 /tests/errmsgs
parentf6eb1d4d7d09eee1c366eff44437034e12bbb099 (diff)
downloadNim-a895bbf714894b059361d0c63a0e46e54eb22da3.tar.gz
fixes #18983 #5282 #13008; recursive types casue infinite type (#20172)
* fixes #18983 #5282 #13008; recursive types casue infinite type

* re

* add testcases
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/t18983.nim7
-rw-r--r--tests/errmsgs/t5282.nim5
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/errmsgs/t18983.nim b/tests/errmsgs/t18983.nim
new file mode 100644
index 000000000..3451875cb
--- /dev/null
+++ b/tests/errmsgs/t18983.nim
@@ -0,0 +1,7 @@
+discard """
+  errormsg: "illegal recursion in type 'A'"
+"""
+
+type
+  A* = A
+  B = (A,)
diff --git a/tests/errmsgs/t5282.nim b/tests/errmsgs/t5282.nim
new file mode 100644
index 000000000..4da49d155
--- /dev/null
+++ b/tests/errmsgs/t5282.nim
@@ -0,0 +1,5 @@
+discard """
+  errormsg: "illegal recursion in type 'x'"
+"""
+
+type x = distinct x