Bugfix: code generation bug that affected dialogs.nim
This commit is contained in:
parent
a8f6d307a9
commit
3ff6354a7c
4 changed files with 13 additions and 2 deletions
|
|
@ -5373,7 +5373,7 @@ const
|
|||
RESPONSE_ACCEPT* = - cint(3)
|
||||
RESPONSE_DELETE_EVENT* = - cint(4)
|
||||
RESPONSE_OK* = - cint(5)
|
||||
RESPONSE_CANCEL* = - cint(6)
|
||||
RESPONSE_CANCEL* = cint(-6)
|
||||
RESPONSE_CLOSE* = - cint(7)
|
||||
RESPONSE_YES* = - cint(8)
|
||||
RESPONSE_NO* = - cint(9)
|
||||
|
|
@ -16652,6 +16652,7 @@ proc file_chooser_dialog_new*(title: cstring, parent: PWindow,
|
|||
action: TFileChooserAction,
|
||||
first_button_text: cstring): PFileChooser{.cdecl,
|
||||
varargs, dynlib: lib, importc: "gtk_file_chooser_dialog_new".}
|
||||
|
||||
proc file_chooser_dialog_new_with_backend*(title: cstring, parent: PWindow,
|
||||
action: TFileChooserAction, backend: cstring, first_button_text: cstring): PFileChooser{.
|
||||
varargs, cdecl, dynlib: lib,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ proc genLiteral(p: BProc, v: PNode, ty: PType): PRope =
|
|||
result = ropef("(($1) $2)", [getTypeDesc(p.module,
|
||||
skipTypes(ty, abstractVarRange)), intLiteral(v.intVal)])
|
||||
of nkNilLit:
|
||||
result = toRope("0")
|
||||
result = toRope("NIM_NIL")
|
||||
of nkStrLit..nkTripleStrLit:
|
||||
if skipTypes(ty, abstractVarRange).kind == tyString:
|
||||
var id = NodeTableTestOrSet(p.module.dataCache, v, gid)
|
||||
|
|
|
|||
8
tests/accept/compile/tbug538751.nim
Executable file
8
tests/accept/compile/tbug538751.nim
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
type
|
||||
PNode = ref TNode
|
||||
TNode = tuple[self: PNode]
|
||||
|
||||
var node: PNode
|
||||
new(node)
|
||||
node.self = node
|
||||
|
||||
2
tests/accept/compile/temptyecho.nim
Executable file
2
tests/accept/compile/temptyecho.nim
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
echo()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue