www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9561] New: Many error messages from std.format

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs 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: -------
Feb 21 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9561


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
          Component|Phobos                      |DMD
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-04-05 12:23:59 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1848

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 05 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9561



--- Comment #2 from github-bugzilla puremagic.com 2013-04-06 12:17:19 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/69c6271fbfb4d20dc13a2f108022255a913c682a
fix Issue 9561 - Many error messages from std.format

https://github.com/D-Programming-Language/dmd/commit/03cf92699fba8b13c11b20a0f993623f183df61c
Merge pull request #1848 from 9rnsr/fix9561

Issue 9561 - Many error messages from std.format

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 06 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9561


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 06 2013