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

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


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

takeCDecl(ugh[int])