@@ -59,7 +59,7 @@ class StringBuf {
If `x` is null, the String "null" is appended.
**/
- public inline function add( x : Dynamic ) : Void {
+ public inline function add<T>( x : T ) : Void {
b += x;
}
@@ -22,7 +22,7 @@
@:coreApi
class StringBuf {
- private var b : Array<String>;
+ private var b : Array<Dynamic>;
public var length(get,never) : Int;
@@ -37,7 +37,7 @@ class StringBuf {
return len;
- public function add( x : Dynamic ) : Void {
+ public function add<T>( x : T ) : Void {
b.push(x);
@@ -34,7 +34,7 @@ class StringBuf {
return b.Length;
b.Append(Std.string(x));
@@ -35,10 +35,10 @@ class StringBuf {
return b.length();
if (Std.is(x, Int))
{
- var x:Int = x;
+ var x:Int = cast x;
var xd:Dynamic = x;
b.append(xd);
} else {
@@ -33,7 +33,7 @@
return __get_length == null ? untyped __dollar__ssize( __to_string(b) ) : __get_length(b);
__add(b,x);
@@ -32,8 +32,8 @@
return b.length;
- untyped if( __call__('is_null',x) ) x = 'null' else if( __call__('is_bool',x) ) x = x?'true':'false';
+ untyped if( __call__('is_null',x) ) x = cast 'null' else if( __call__('is_bool',x) ) x = cast (x?'true':'false');