Browse Source

fix string concat in special circumstances

frabbit 11 years ago
parent
commit
fee7b55b41
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genpy.ml

+ 1 - 1
genpy.ml

@@ -1051,7 +1051,7 @@ module Printer = struct
 				in
 				let e1_str = safe_string e1 in
 				let e2_str = safe_string e2 in
-				Printf.sprintf "%s + %s" e1_str e2_str
+				Printf.sprintf "(%s + %s)" e1_str e2_str
 			| TBinop(OpAdd,e1,e2) when (match follow e.etype with TDynamic _ -> true | _ -> false) ->
 				Printf.sprintf "python_Boot._add_dynamic(%s,%s)" (print_expr pctx e1) (print_expr pctx e2);
 			| TBinop(op,e1,e2) ->