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

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


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

takeCDecl(ugh[int])