diff options
-rw-r--r-- | tests/template/template_issues.nim | 8 | ||||
-rw-r--r-- | tissues.nim (renamed from tests/ccgbugs/trecursive_closure.nim) | 10 |
2 files changed, 18 insertions, 0 deletions
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 diff --git a/tests/ccgbugs/trecursive_closure.nim b/tissues.nim index 4b6514b90..7a8ede958 100644 --- a/tests/ccgbugs/trecursive_closure.nim +++ b/tissues.nim @@ -16,3 +16,13 @@ f(nil) 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 |