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

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


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

takeCDecl(ugh[int])