mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-18 02:27:10 +00:00
12 lines
233 B
Nim
12 lines
233 B
Nim
|
|
var
|
|
global: int
|
|
|
|
proc dontcare(x: int): int = return x + global
|
|
|
|
proc SideEffectLyer(x, y: int): int {.noSideEffect.} = #ERROR_MSG 'SideEffectLyer' can have side effects
|
|
return x + y + dontcare(x)
|
|
|
|
echo SideEffectLyer(1, 3)
|
|
|