[Issue 11299] New: Regression (2.064 git-head): formattedRead does not compile without -unittest

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 19 03:58:35 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11299

           Summary: Regression (2.064 git-head): formattedRead does not
                    compile without -unittest
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: pull
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: andrej.mitrovich at gmail.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-10-19 03:58:32 PDT ---
-----
import std.format;
import std.typecons;

void main()
{
    Tuple!(int, int) t;
    string s = "1 2";
    formattedRead(s, "%s %s", &t);
}
-----

C:\dev\code\d_code>dmd test.d
DMD v2.064 DEBUG
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(578): Error: template
instance isTuple!A template 'isT
uple' is not defined
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(588): Error: template
std.format.unformatValue does no
t match any function template declaration. Candidates are:
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(3939):       
std.format.unformatValue(T, Range, Char)
(ref Range input, ref FormatSpec!Char spec) if (isInputRange!Range &&
is(Unqual!T == bool))
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(3994):       
std.format.unformatValue(T, Range, Char)
(ref Range input, ref FormatSpec!Char spec) if (isInputRange!Range && is(T ==
typeof(null)))
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(4006):       
std.format.unformatValue(T, Range, Char)
(ref Range input, ref FormatSpec!Char spec) if (isInputRange!Range &&
isIntegral!T && !is(T == enum))
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(4026):       
std.format.unformatValue(T, Range, Char)
(ref Range input, ref FormatSpec!Char spec) if (isFloatingPoint!T && !is(T ==
enum))
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(4102):       
std.format.unformatValue(T, Range, Char)
(ref Range input, ref FormatSpec!Char spec) if (isInputRange!Range &&
isSomeChar!T && !is(T == enum))
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(588):        ... (4
more, -v to show) ...
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(588): Error: template
std.format.unformatValue(T, Rang
e, Char)(ref Range input, ref FormatSpec!Char spec) if (isInputRange!Range &&
is(Unqual!T == bool)) cannot deduc
e template function from argument types !(Tuple!(int, int))(string,
FormatSpec!char)
test.d(10): Error: template instance std.format.formattedRead!(string, char,
Tuple!(int, int)*) error instantiat
ing

This is going to keep happening if we only run the test-suite with the
-unittest flag.

-- 
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