summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-07-11 19:17:40 +0200
committerClyybber <darkmine956@gmail.com>2020-07-11 19:17:40 +0200
commitd409694b02ae403501b23a94c21f60ad8edb7365 (patch)
treea0a19a2267644f0f7da9604ee1eb6a33856bee2d /tests
parent21772b6419b6cb3b59b436fbdcd8975a9da62349 (diff)
downloadNim-d409694b02ae403501b23a94c21f60ad8edb7365.tar.gz
:D
Diffstat (limited to 'tests')
-rw-r--r--tests/ccgbugs/tissues.nim28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/ccgbugs/tissues.nim b/tests/ccgbugs/tissues.nim
new file mode 100644
index 000000000..7a8ede958
--- /dev/null
+++ b/tests/ccgbugs/tissues.nim
@@ -0,0 +1,28 @@
+discard """
+action: compile
+"""
+
+# bug #2233
+type MalType = object
+  fun: proc: MalType
+
+proc f(x: proc: MalType) =
+  discard x()
+
+f(nil)
+
+# bug #2823
+
+type A = object #of RootObj <-- Uncomment this to get no errors
+  test: proc(i: A): bool
+var a: proc(i: A): bool # Or comment this line to get no errors
+
+
+# bug #2703
+type
+  fooObj[T] = object of RootObj
+  bazObj[T] = object of fooObj[T]
+    x: T
+
+var troz: fooObj[string]
+echo bazObj[string](troz).x