mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 06:54:16 +00:00
11 lines
244 B
Nim
11 lines
244 B
Nim
|
|
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
|