closes #6559; add testcase (#20200)

(cherry picked from commit 1a7b33942b)
This commit is contained in:
ringabout
2022-08-12 09:03:10 +08:00
committed by narimiran
parent f3300c1a9c
commit 6f347a82aa

View File

@@ -27,3 +27,20 @@ func mkEnter() =
helper()
else:
let ast = getAst(helper())
# bug #6559
type
SafeFn = proc (): void {. raises: [] }
proc ok() {. raises: [] .} = discard
proc fail() {. raises: [] .}
let f1 : SafeFn = ok
let f2 : SafeFn = fail
proc fail() = discard
f1()
f2()