www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17358] New: [REG 2.074.0]


          Issue ID: 17358
           Summary: [REG 2.074.0] std.stdio.File.lockingTextWriter.put no
                    longer accepts chains of characters
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: jack jackstouffer.com

This compiled in 2.073.2 and doesn't anymore

void main()
    import std.stdio;
    import std.range;
    import std.conv;

    auto f = File("test", "w");
    auto s = 42.toChars;
    f.lockingTextWriter.put(chain(s, "\n"));

test2.d(12): Error: template std.stdio.File.LockingTextWriter.put cannot deduce
function from argument types !()(Result), candidates are:
std.stdio.File.LockingTextWriter.put(A)(A writeme) if
((isSomeChar!(Unqual!(ElementType!A)) || is(ElementType!A : const(ubyte))) &&
isInputRange!A && !isInfinite!A)
std.stdio.File.LockingTextWriter.put(C)(C c) if (isSomeChar!C || is(C :

To be honest, I have no idea what is going on here, because the sig constraint

    pragma(msg, (isSomeChar!(Unqual!(ElementType!A)) || is(ElementType!A :
const(ubyte))) && isInputRange!A && !isInfinite!A);

prints "true".

Apr 28 2017