Add testcase for some old fixed issues (#14960)
* Add testcase for #2703 * Add testcase for #2586 * Small fix
This commit is contained in:
parent
1850efbb6c
commit
425972c4e8
2 changed files with 18 additions and 0 deletions
|
|
@ -11,6 +11,8 @@ hey
|
||||||
foo
|
foo
|
||||||
foo
|
foo
|
||||||
foo
|
foo
|
||||||
|
false
|
||||||
|
true
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -266,3 +268,9 @@ iterator hello() : int {.closure.} =
|
||||||
|
|
||||||
foof(int)
|
foof(int)
|
||||||
ggg(hello)
|
ggg(hello)
|
||||||
|
|
||||||
|
|
||||||
|
# bug #2586
|
||||||
|
var z = 10'u8
|
||||||
|
echo z < 9 # Works
|
||||||
|
echo z > 9 # Error: type mismatch
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,13 @@ f(nil)
|
||||||
type A = object #of RootObj <-- Uncomment this to get no errors
|
type A = object #of RootObj <-- Uncomment this to get no errors
|
||||||
test: proc(i: A): bool
|
test: proc(i: A): bool
|
||||||
var a: proc(i: A): bool # Or comment this line to get no errors
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue