shithub: mc

Download patch

ref: 82caf37a31be7f2cc513d05309e91452a862a5d6
parent: 56d2169a67ffa0b286ee501a22cbbb7da8946bb9
author: Ori Bernstein <[email protected]>
date: Mon Feb 24 14:18:44 EST 2014

Don't set the namespace if we don't have one.

    This prevents spurious failures in matching namespaces.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1343,7 +1343,8 @@
            to do namespace dependent comparisons for specializing, we need to set the
            namespace.
          */
-        setns(dcl->decl.name, namestr(file->file.globls->name));
+        if (file->file.globls->name)
+            setns(dcl->decl.name, namestr(file->file.globls->name));
         for (j = 0; j < t->nfuncs; j++) {
             if (nameeq(dcl->decl.name, t->funcs[j]->decl.name)) {
                 proto = t->funcs[j];