From: Jürg Billeter Date: Sat, 5 Jun 2010 07:56:33 +0000 (+0200) Subject: dova: Support string concatenation X-Git-Tag: 0.9.1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abaeffe3e9802af675363af993d43fe923111079;p=thirdparty%2Fvala.git dova: Support string concatenation --- diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala index 6b579b1dd..bc4965f35 100644 --- a/vala/valabinaryexpression.vala +++ b/vala/valabinaryexpression.vala @@ -262,6 +262,14 @@ public class Vala.BinaryExpression : Expression { && operator == BinaryOperator.PLUS) { // string concatenation + if (analyzer.context.profile == Profile.DOVA) { + var concat_call = new MethodCall (new MemberAccess (left, "concat")); + concat_call.add_argument (right); + concat_call.target_type = target_type; + parent_node.replace_expression (this, concat_call); + return concat_call.check (analyzer); + } + if (right.value_type == null || right.value_type.data_type != analyzer.string_type.data_type) { error = true; Report.error (source_reference, "Operands must be strings");