www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8869] New: std.typecons.Unique instance doesn't compile, needs std.stdio

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8869

           Summary: std.typecons.Unique instance doesn't compile, needs
                    std.stdio
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: earthfront gmail.com



---
Using DMD64 v2.059 on Ubuntu 12.04 64bit:

[BEGIN EXAMPLE CODE:main.d]
void main(string[] args)
{
    class Widget
    { int a; }

    {       
        import std.typecons;
        Unique!Widget uw = new Widget;
    }
}
[END EXAMPLE CODE]

Results in:
$ dmd main.d 
/usr/include/x86_64-linux-gnu/dmd/phobos/std/typecons.d(91): Error: 'writeln'
is not defined, perhaps you need to import std.stdio; ?
/usr/include/x86_64-linux-gnu/dmd/phobos/std/typecons.d(102): Error: 'writeln'
is not defined, perhaps you need to import std.stdio; ?
/usr/include/x86_64-linux-gnu/dmd/phobos/std/typecons.d(134): Error: 'writeln'
is not defined, perhaps you need to import std.stdio; ?
/usr/include/x86_64-linux-gnu/dmd/phobos/std/typecons.d(145): Error: 'writeln'
is not defined, perhaps you need to import std.stdio; ?
/usr/include/x86_64-linux-gnu/dmd/phobos/std/typecons.d(148): Error: 'writeln'
is not defined, perhaps you need to import std.stdio; ?
main.d(8): Error: template instance std.typecons.Unique!(Widget) error
instantiating

Including std.stdio anywhere in my program doesn't help.

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




---
It appears that the import section of "std.typecons" has a conditional import
statement:

"version(unittest) import core.vararg, std.stdio;"

but the "writeln" statements don't seem to correlate with that.

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


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |WORKSFORME



12:48:24 PST ---
Fixed since 2.060.

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