shithub: mc

Download patch

ref: 45e91dd432edaa124a2699b5d35a3a86f6eedfad
parent: 1813b4c97ae6b43914fc39b804abf40309071acd
author: Ori Bernstein <[email protected]>
date: Sat May 24 19:21:25 EDT 2014

Print the correct line with name conflicts.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -847,7 +847,7 @@
             if (!trg)
                 puttrait(globls, nx, trx);
             else
-                fatal(nx->line, "Exported trait %s already declared on line %d", namestr(nx), tg->line);
+                fatal(nx->line, "Exported trait %s already declared on line %d", namestr(nx), trg->name->line);
         } else {
             trg = gettrait(globls, nx);
             if (trg && !trg->isproto) {