diff options
Diffstat (limited to 'tests/effects/tsidee4.nim')
-rw-r--r-- | tests/effects/tsidee4.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/effects/tsidee4.nim b/tests/effects/tsidee4.nim new file mode 100644 index 000000000..cbebfbd36 --- /dev/null +++ b/tests/effects/tsidee4.nim @@ -0,0 +1,17 @@ +discard """ + file: "tsidee4.nim" + line: 15 + errormsg: "type mismatch" +""" + +var + global: int + +proc dontcare(x: int): int = return x + +proc noSideEffect(x, y: int, p: proc (a: int): int {.noSideEffect.}): int {.noSideEffect.} = + return x + y + dontcare(x) + +echo noSideEffect(1, 3, dontcare) #ERROR_MSG type mismatch + + |