summary refs log tree commit diff stats
path: root/tests/reject/tinvalidclosure.nim
blob: c06270bfa33ca986ba29ddaafd0ea4544ce4b4a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  line: 12
  errormsg: "type mismatch: got (proc (int){.closure.})"
"""

proc ugh[T](x: T) {.closure.} =
  echo "ugha"


proc takeCdecl(p: proc (x: int) {.cdecl.}) = nil

takeCDecl(ugh[int])