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

           Summary: const(typeof(null)) fails to print correctly
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Simen Kjaeraas <[email protected]> 2013-10-30 14:46:22 
PDT ---
In the following cases, empty string is returned:

import std.conv : to;
const(typeof(null)) ctn;
immutable(typeof(null)) itn;
assert(ctn.to!string == "");
assert(itn.to!string == "");

Also, writeln fails horribly when confronted with a const or immutable typeof
null:

import std.stdio : writeln;
const(typeof(null)) ctn;
immutable(typeof(null)) itn;
writeln(ctn);
writeln(itn);

phobos\std\stdio.d(1906): Error: no property 'length' for type 'typeof(null)'
phobos\std\stdio.d(1906): Error: no property 'ptr' for type 'typeof(null)'
.\foo.d(77): Error: template instance std.stdio.writeln!(typeof(null)) error
instantiating


See also bug 11226.

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

Reply via email to