Browse Source

fixed issue #729

Nicolas Cannasse 13 years ago
parent
commit
ce700520e5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/haxe/macro/Format.hx

+ 2 - 2
std/haxe/macro/Format.hx

@@ -82,7 +82,7 @@ class Format {
 				start++;
 				start++;
 				var len = i - start - 1;
 				var len = i - start - 1;
 				var expr = str.substr(start, len);
 				var expr = str.substr(start, len);
-				add(Context.parse(expr, make(len)));
+				add(Context.parseInlineString(expr, make(len)));
 				pos.min++;
 				pos.min++;
 				start++;
 				start++;
 			} else if( (c >= 'a'.code && c <= 'z'.code) || (c >= 'A'.code && c <= 'Z'.code) || c == '_'.code ) {
 			} else if( (c >= 'a'.code && c <= 'z'.code) || (c >= 'A'.code && c <= 'Z'.code) || c == '_'.code ) {
@@ -111,7 +111,7 @@ class Format {
 			add({ expr : EConst(CString(str.substr(start,len))), pos : make(len) });
 			add({ expr : EConst(CString(str.substr(start,len))), pos : make(len) });
 		if( expr == null )
 		if( expr == null )
 			expr = { expr : EConst(CString("")), pos : make(0) };
 			expr = { expr : EConst(CString("")), pos : make(0) };
-		return expr;
+		return { expr : ECheckType(expr,TPath({ pack : [], name : "String", params : [] })), pos : expr.pos };
 	}
 	}
 	#end
 	#end