[vala] Do not put new in front of struct creation in code writer
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Do not put new in front of struct creation in code writer
- Date: Fri, 29 Jan 2010 15:04:15 +0000 (UTC)
commit d6025e74cc1c6d7ed69a9a29a963e56ecb67147a
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Sat Jan 23 22:40:16 2010 +0100
Do not put new in front of struct creation in code writer
Fixes bug 607937.
vala/valacodewriter.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index 99252cb..b94f777 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -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 (" (");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]