closes #6559; add testcase (#20200)

This commit is contained in:
ringabout 2022-08-12 09:03:10 +08:00 • committed by GitHub
commit 1a7b33942b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,3 +27,20 @@ func mkEnter() =
helper() helper()
else: else:
let ast = getAst(helper()) 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()