shithub: mc

Download patch

ref: 57d353555aedbad8ad4f2bb022a58d6b01cb941b
parent: 077743e60829979ec6d86760e8806e1d599419bc
author: Ori Bernstein <[email protected]>
date: Wed Feb 19 15:13:03 EST 2014

Error if we have an unimplemented trait function

    Right now, that's all of them.

--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -394,6 +394,8 @@
         printf("depth[%d] specializing [%d]%s => %s\n", stabstkoff, n->line, namestr(n->decl.name), namestr(*name));
     if (d)
         return d;
+    if (n->decl.istraitfn)
+        fatal(n->line, "No trait implemented for for %s\n", namestr(n->decl.name));
     /* namespaced names need to be looked up in their correct
      * context. */
     if (n->decl.name->name.ns) {