Merge formatValue documents for class and interface.

This commit is contained in:
k-hara 2011-06-29 11:36:43 +09:00
parent 95c16dc075
commit b08e7c9995

View file

@ -1419,6 +1419,8 @@ if (isPointer!T && !isInputRange!T)
/**
Objects are formatted by calling $(D toString).
Interfaces are formatted by casting to $(D Object) and then calling
$(D toString).
*/
void formatValue(Writer, T, Char)(Writer w, T val, ref FormatSpec!Char f)
if (!isSomeString!T && is(T == class) && !isInputRange!T)
@ -1429,14 +1431,11 @@ if (!isSomeString!T && is(T == class) && !isInputRange!T)
else put(w, val.toString);
}
/**
Interfaces are formatted by casting to $(D Object) and then calling
$(D toString).
*/
/// ditto
void formatValue(Writer, T, Char)(Writer w, T val, ref FormatSpec!Char f)
if (is(T == interface) && !isInputRange!T)
{
return formatValue(w, cast(Object) val, f);
return formatValue(w, cast(Object)val, f);
}
unittest