mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
17 lines
407 B
Nim
17 lines
407 B
Nim
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) |