[vala/staging] ccode: Fix CCodeUnaryExpression.write() for PREFIX_INCREMENT/PREFIX_DECREMENT



commit 6bf651d454573db6a40e380bcff06d3bd43b77eb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Nov 24 21:26:03 2021 +0100

    ccode: Fix CCodeUnaryExpression.write() for PREFIX_INCREMENT/PREFIX_DECREMENT
    
    Regression of 0f65d306f5a2eca7ea798e5c835cf66b6e327c8e

 ccode/valaccodeunaryexpression.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/ccode/valaccodeunaryexpression.vala b/ccode/valaccodeunaryexpression.vala
index 548e42181..fb318815f 100644
--- a/ccode/valaccodeunaryexpression.vala
+++ b/ccode/valaccodeunaryexpression.vala
@@ -67,8 +67,8 @@ public class Vala.CCodeUnaryExpression : CCodeExpression {
                        writer.write_string ("&");
                        inner.write_inner (writer);
                        break;
-               case CCodeUnaryOperator.PREFIX_INCREMENT: writer.write_string ("++"); break;
-               case CCodeUnaryOperator.PREFIX_DECREMENT: writer.write_string ("--"); break;
+               case CCodeUnaryOperator.PREFIX_INCREMENT: writer.write_string ("++"); inner.write_inner 
(writer); break;
+               case CCodeUnaryOperator.PREFIX_DECREMENT: writer.write_string ("--"); inner.write_inner 
(writer); break;
                case CCodeUnaryOperator.POSTFIX_INCREMENT: inner.write_inner (writer); writer.write_string 
("++"); break;
                case CCodeUnaryOperator.POSTFIX_DECREMENT: inner.write_inner (writer); writer.write_string 
("--"); break;
                default: assert_not_reached ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]