[Issue 17141] New: CommonType!(dchar, char) returns uint

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 3 10:18:50 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17141

          Issue ID: 17141
           Summary: CommonType!(dchar, char) returns uint
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: jack at jackstouffer.com

Should return dchar.

This breaks range functions like chain, example:

string name = "Jack";
auto app = appender!string();
app.put(
    chain(name, toChars(10))
);


Error: template std.array.Appender!string.Appender.put cannot deduce function
from argument types !()(Result), candidates are:
/usr/local/Cellar/dmd/2.073.0/include/dlang/dmd/std/array.d(2820):       
std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)
/usr/local/Cellar/dmd/2.073.0/include/dlang/dmd/std/array.d(2848):       
std.array.Appender!string.Appender.put(Range)(Range items) if
(canPutConstRange!Range)
/usr/local/Cellar/dmd/2.073.0/include/dlang/dmd/std/array.d(2857):       
std.array.Appender!string.Appender.put(Range)(Range items) if
(canPutRange!Range)

--


More information about the Digitalmars-d-bugs mailing list