mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 11:26:39 +00:00
Add testcase for some old fixed issues (#14960)
* Add testcase for #2703 * Add testcase for #2586 * Small fix
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user