summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJuan M Gómez <info@jmgomez.me>2023-06-16 07:23:25 +0100
committerGitHub <noreply@github.com>2023-06-16 08:23:25 +0200
commitb4d9be0f8ae6c97d581e3d32f502a3c323f18475 (patch)
tree36a0637d73b6041cbf12eaa1c8218652b56d8cf0 /tests
parent0a19d78b228a2d2e7b5e2341edf45b5ee669196a (diff)
downloadNim-b4d9be0f8ae6c97d581e3d32f502a3c323f18475.tar.gz
fixes ilegal recursion (#22105)
Diffstat (limited to 'tests')
-rw-r--r--tests/objects/tillegal_recursion2.nim6
-rw-r--r--tests/objects/tillegal_recursion3.nim6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/objects/tillegal_recursion2.nim b/tests/objects/tillegal_recursion2.nim
new file mode 100644
index 000000000..ce2279f04
--- /dev/null
+++ b/tests/objects/tillegal_recursion2.nim
@@ -0,0 +1,6 @@
+discard """
+  errormsg: "Cannot inherit from: 'Foo'"
+  line: 6
+"""
+type
+  Foo = object of Foo
diff --git a/tests/objects/tillegal_recursion3.nim b/tests/objects/tillegal_recursion3.nim
new file mode 100644
index 000000000..c80f29e28
--- /dev/null
+++ b/tests/objects/tillegal_recursion3.nim
@@ -0,0 +1,6 @@
+discard """
+  errormsg: "Cannot inherit from: 'Foo'"
+  line: 6
+"""
+type
+  Foo = object of ref Foo
titer7.nim?h=devel&id=2162a71c9314ed8bba7a8b9926e2d9637f7c6825'>^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53