diff --git a/tests/effects/tstrict_effects3.nim b/tests/effects/tstrict_effects3.nim index 4cc46154940b..027b4647413a 100644 --- a/tests/effects/tstrict_effects3.nim +++ b/tests/effects/tstrict_effects3.nim @@ -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() +