]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not put new in front of struct creation in code writer
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Sat, 23 Jan 2010 21:40:16 +0000 (22:40 +0100)
committerJürg Billeter <j@bitron.ch>
Fri, 29 Jan 2010 15:02:52 +0000 (16:02 +0100)
Fixes bug 607937.

vala/valacodewriter.vala

index 99252cbd09ab266a39ace05e5b7586e54bea757d..b94f777951dfa7acecd3a200df7d057fa820dd7e 100644 (file)
@@ -1425,7 +1425,10 @@ public class Vala.CodeWriter : CodeVisitor {
        }
 
        public override void visit_object_creation_expression (ObjectCreationExpression expr) {
-               write_string ("new ");
+               if (!expr.struct_creation) {
+                       write_string ("new ");
+               }
+
                write_type (expr.type_reference);
                write_string (" (");