www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11390] New: const(typeof(null)) fails to print correctly

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras gmail.com> 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: -------
Oct 30 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11390


Simen Kjaeraas <simen.kjaras gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Simen Kjaeraas <simen.kjaras gmail.com> 2013-10-30 14:51:28
PDT ---
https://github.com/D-Programming-Language/phobos/pull/1674

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



--- Comment #2 from github-bugzilla puremagic.com 2013-11-01 10:17:19 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/0c5a439e934b25986823a682ed53a2273494367a
Fix bug 11390

https://github.com/D-Programming-Language/phobos/commit/ac9fcce808f1125ad7c6fe3b639c678c09b9e250
Better fix for bug 11390 :p

https://github.com/D-Programming-Language/phobos/commit/9741b28af258a6150ba65e9a1dddc5e7513ce1ff
Merge pull request #1674 from BioTronic/master

Fix bug 11390

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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