mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
18 lines
323 B
Nim
18 lines
323 B
Nim
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
|
|
|
|
|