[Issue 9561] New: Many error messages from std.format
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 21 13:27:05 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9561
Summary: Many error messages from std.format
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-02-21 13:27:04 PST ---
import std.stdio: writeln;
import std.algorithm: map;
import std.math: log;
void main() {
writeln( map!(p => log(1, 2))([1]) );
}
dmd 2.063alpha:
temp.d(5): Error: function std.math.log (real x) is not callable using argument
types (int,int)
temp.d(5): Error: expected 1 arguments, not 2 for non-variadic function type
pure nothrow @safe real(real x)
...\dmd2\src\phobos\std\algorithm.d(404): Error: template instance
temp.main.__lambda2!(int) error instantiating
...\dmd2\src\phobos\std\algorithm.d(390): instantiated from here:
MapResult!(__lambda2, int[])
temp.d(5): instantiated from here: map!(int[])
...\dmd2\src\phobos\std\algorithm.d(390): Error: template instance
temp.main.MapResult!(__lambda2, int[]) error instantiating
temp.d(5): instantiated from here: map!(int[])
temp.d(5): Error: template instance temp.main.map!(__lambda2).map!(int[]) error
instantiating
...\dmd2\src\phobos\std\format.d(2105): Error: template std.format.formatValue
does not match any function template declaration. Candidates are:
...\dmd2\src\phobos\std\format.d(1205): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(BooleanTypeOf!(T)) &&
!is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1266): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(T == typeof(null)) &&
!is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1282): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(IntegralTypeOf!(T))
&& !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1505): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if
(is(FloatingPointTypeOf!(T)) && !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1628): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(Unqual!(T) : creal)
&& !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(2105): ... (14 more, -v to show) ...
...\dmd2\src\phobos\std\format.d(1205): Error: template std.format.formatValue
cannot deduce template function from argument types
!()(LockingTextWriter,_error_,FormatSpec!(char))
...\dmd2\src\phobos\std\format.d(2113): Error: template
std.format.formatElement does not match any function template declaration.
Candidates are:
...\dmd2\src\phobos\std\format.d(2191): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(StringTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2261): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(CharTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2276): std.format.formatElement(Writer,
T, Char)(Writer w, auto ref T val, ref FormatSpec!(Char) f) if
(!is(StringTypeOf!(T)) && !is(CharTypeOf!(T)) || is(T == enum))
...\dmd2\src\phobos\std\format.d(2191): Error: template
std.format.formatElement cannot deduce template function from argument types
!()(LockingTextWriter,_error_,FormatSpec!(char))
...\dmd2\src\phobos\std\format.d(2118): Error: template
std.format.formatElement does not match any function template declaration.
Candidates are:
...\dmd2\src\phobos\std\format.d(2191): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(StringTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2261): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(CharTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2276): std.format.formatElement(Writer,
T, Char)(Writer w, auto ref T val, ref FormatSpec!(Char) f) if
(!is(StringTypeOf!(T)) && !is(CharTypeOf!(T)) || is(T == enum))
...\dmd2\src\phobos\std\format.d(2191): Error: template
std.format.formatElement cannot deduce template function from argument types
!()(LockingTextWriter,_error_,FormatSpec!(char))
...\dmd2\src\phobos\std\format.d(2133): Error: template std.format.formatValue
does not match any function template declaration. Candidates are:
...\dmd2\src\phobos\std\format.d(1205): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(BooleanTypeOf!(T)) &&
!is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1266): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(T == typeof(null)) &&
!is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1282): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(IntegralTypeOf!(T))
&& !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1505): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if
(is(FloatingPointTypeOf!(T)) && !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(1628): std.format.formatValue(Writer,
T, Char)(Writer w, T obj, ref FormatSpec!(Char) f) if (is(Unqual!(T) : creal)
&& !is(T == enum) && !hasToString!(T, Char))
...\dmd2\src\phobos\std\format.d(2133): ... (14 more, -v to show) ...
...\dmd2\src\phobos\std\format.d(1205): Error: template std.format.formatValue
cannot deduce template function from argument types
!()(LockingTextWriter,_error_,FormatSpec!(char))
...\dmd2\src\phobos\std\format.d(2135): Error: template
std.format.formatElement does not match any function template declaration.
Candidates are:
...\dmd2\src\phobos\std\format.d(2191): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(StringTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2261): std.format.formatElement(Writer,
T, Char)(Writer w, T val, ref FormatSpec!(Char) f) if (is(CharTypeOf!(T)) &&
!is(T == enum))
...\dmd2\src\phobos\std\format.d(2276): std.format.formatElement(Writer,
T, Char)(Writer w, auto ref T val, ref FormatSpec!(Char) f) if
(!is(StringTypeOf!(T)) && !is(CharTypeOf!(T)) || is(T == enum))
...\dmd2\src\phobos\std\format.d(2191): Error: template
std.format.formatElement cannot deduce template function from argument types
!()(LockingTextWriter,_error_,FormatSpec!(char))
...\dmd2\src\phobos\std\range.d(611): Error: static assert "Cannot put a
char[] into a Appender!(string)"
...\dmd2\src\phobos\std\format.d(1436): instantiated from here:
put!(Appender!(string), char[])
...\dmd2\src\phobos\std\format.d(1338): instantiated from here:
formatUnsigned!(Appender!(string), char)
...\dmd2\src\phobos\std\format.d(1312): instantiated from here:
formatIntegral!(Appender!(string), ulong, char)
...\dmd2\src\phobos\std\format.d(1721): ... (11 instantiations, -v to
show) ...
...\dmd2\src\phobos\std\stdio.d(1621): instantiated from here:
write!(MapResult!(__lambda2, int[]),char)
temp.d(5): instantiated from here: writeln!(MapResult!(__lambda2,
int[]))
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list