Skip to content

Commit

Permalink
closes #6559; add testcase (#20200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Aug 12, 2022
1 parent ff25103 commit 1a7b339
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/effects/tstrict_effects3.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 1a7b339

Please sign in to comment.