summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xlib/wrappers/gtk/gtk2.nim3
-rwxr-xr-xrod/ccgexprs.nim2
-rwxr-xr-xtests/accept/compile/tbug538751.nim8
-rwxr-xr-xtests/accept/compile/temptyecho.nim2
4 files changed, 13 insertions, 2 deletions
diff --git a/lib/wrappers/gtk/gtk2.nim b/lib/wrappers/gtk/gtk2.nim
index f1690048b..f82547471 100755
--- a/lib/wrappers/gtk/gtk2.nim
+++ b/lib/wrappers/gtk/gtk2.nim
@@ -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, 
diff --git a/rod/ccgexprs.nim b/rod/ccgexprs.nim
index 6eae842f2..2fbaf2d4a 100755
--- a/rod/ccgexprs.nim
+++ b/rod/ccgexprs.nim
@@ -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)
diff --git a/tests/accept/compile/tbug538751.nim b/tests/accept/compile/tbug538751.nim
new file mode 100755
index 000000000..c9ac45797
--- /dev/null
+++ b/tests/accept/compile/tbug538751.nim
@@ -0,0 +1,8 @@
+type
+    PNode = ref TNode
+    TNode = tuple[self: PNode]
+
+var node: PNode
+new(node)
+node.self = node
+
diff --git a/tests/accept/compile/temptyecho.nim b/tests/accept/compile/temptyecho.nim
new file mode 100755
index 000000000..5f1aa6515
--- /dev/null
+++ b/tests/accept/compile/temptyecho.nim
@@ -0,0 +1,2 @@
+echo()
+