]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix emit->code stack, class_def must return error on failure
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 26 May 2020 16:57:36 +0000 (18:57 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 26 May 2020 16:57:36 +0000 (18:57 +0200)
src/emit/emit.c

index 25eb700219781ce0ed35bc9320a6de1dc0ee2a43..2c6a0e843b0bc19af53848732f9157421de41721 100644 (file)
@@ -2033,8 +2033,10 @@ ANN static m_bool emit_class_def(const Emitter emit, const Class_Def cdef) {
     emit_class_code(emit, t->name);
     if(scanx_body(emit->env, cdef, (_exp_func)emit_section, emit) > 0)
       emit_class_finish(emit, t->nspc);
-    else
+    else {
       emit_pop_code(emit);
+      return GW_ERROR;
+    }
   }
   return GW_OK;
 }