mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 17:24:02 +00:00
fixes #292
This commit is contained in:
17
tests/compile/teffects1.nim
Normal file
17
tests/compile/teffects1.nim
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
type
|
||||
PMenu = ref object
|
||||
PMenuItem = ref object
|
||||
|
||||
proc createMenuItem*(menu: PMenu, label: string,
|
||||
action: proc (i: PMenuItem, p: pointer) {.cdecl.}) = nil
|
||||
|
||||
var s: PMenu
|
||||
createMenuItem(s, "Go to definition...",
|
||||
proc (i: PMenuItem, p: pointer) {.cdecl.} =
|
||||
try:
|
||||
echo(i.repr)
|
||||
except EInvalidValue:
|
||||
echo("blah")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user