summary refs log blame commit diff stats
path: root/tests/effects/tsidee4.nim
blob: 2cb88a23ee47085852e9786a8d6992fb242fac83 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11




                           





                                     
                                                                                            
                            
 
                                                          

 
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