]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Use error() instead of Report.error() inside of CodeContext.get()
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 13 Mar 2020 18:09:07 +0000 (19:09 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 13 Mar 2020 18:09:07 +0000 (19:09 +0100)
This is a bad thing while Report.error() actually uses CodeContext.get()

Regression of e436f2833dc332e3fd728fe6f6b2cd7f224dcf33

vala/valacodecontext.vala

index 88956caf9e7994643085205bb6cf1791d2806b61..9f21b91393ae62558db4381b20be84aaa9549f4d 100644 (file)
@@ -260,8 +260,7 @@ public class Vala.CodeContext {
                List<CodeContext>* context_stack = context_stack_key.get ();
 
                if (context_stack == null || context_stack->size == 0) {
-                       Report.error (null, "internal: No context available to get");
-                       assert_not_reached ();
+                       error ("internal: No context available to get");
                }
 
                return context_stack->get (context_stack->size - 1);
@@ -287,8 +286,7 @@ public class Vala.CodeContext {
                List<CodeContext>* context_stack = context_stack_key.get ();
 
                if (context_stack == null || context_stack->size == 0) {
-                       Report.error (null, "internal: No context available to pop");
-                       assert_not_reached ();
+                       error ("internal: No context available to pop");
                }
 
                context_stack->remove_at (context_stack->size - 1);