adds ccMember CC fixes #23434 (#23457)

This commit is contained in:
Juan M Gómez
2024-03-29 21:09:00 +00:00
committed by GitHub
parent 4b6a9e4add
commit cf00b2fd9e
6 changed files with 24 additions and 4 deletions

17
tests/cpp/t23434.nim Normal file
View File

@@ -0,0 +1,17 @@
discard """
cmd:"nim cpp $file"
errormsg: "type mismatch: got <proc (self: SomeObject){.member, gcsafe.}>"
line: 17
"""
type SomeObject = object
value: int
proc printValue(self: SomeObject) {.virtual.} =
echo "The value is ", self.value
proc callAProc(p: proc(self: SomeObject){.noconv.}) =
let someObj = SomeObject(value: 4)
echo "calling param proc"
p(someObj)
callAProc(printValue)