summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-07-10 19:21:50 +0200
committerGitHub <noreply@github.com>2020-07-10 19:21:50 +0200
commit425972c4e8bde84ff8b84a64f1e68356dc0a1a3a (patch)
tree2f0bb288b92656e5cb2c1be216c26b05836d2e56 /tests
parent1850efbb6c618946da7c943b153f7caa9a66ba33 (diff)
downloadNim-425972c4e8bde84ff8b84a64f1e68356dc0a1a3a.tar.gz
Add testcase for some old fixed issues (#14960)
* Add testcase for #2703

* Add testcase for #2586

* Small fix
Diffstat (limited to 'tests')
-rw-r--r--tests/ccgbugs/trecursive_closure.nim18
-rw-r--r--tests/template/template_issues.nim8
2 files changed, 8 insertions, 18 deletions
diff --git a/tests/ccgbugs/trecursive_closure.nim b/tests/ccgbugs/trecursive_closure.nim
deleted file mode 100644
index 4b6514b90..000000000
--- a/tests/ccgbugs/trecursive_closure.nim
+++ /dev/null
@@ -1,18 +0,0 @@
-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
diff --git a/tests/template/template_issues.nim b/tests/template/template_issues.nim
index 420373e61..d12b3c3ef 100644
--- a/tests/template/template_issues.nim
+++ b/tests/template/template_issues.nim
@@ -11,6 +11,8 @@ hey
 foo
 foo
 foo
+false
+true
 '''
 """
 
@@ -266,3 +268,9 @@ iterator hello() : int {.closure.} =
     
 foof(int)
 ggg(hello)
+
+
+# bug #2586
+var z = 10'u8
+echo z < 9 # Works
+echo z > 9 # Error: type mismatch