summary refs log blame commit diff stats
path: root/tests/effects/tsidee1.nim
blob: bd5b32dd75874a6c208c5b82ebcaee960f4c0796 (plain) (tree)
1
2
3
4
5




                                                      










                                                                                                        

 
discard """
  file: "tsidee1.nim"
  line: 12
  errormsg: "\'SideEffectLyer\' can have side effects"
"""

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)