Thread overview
[Issue 8869] New: std.typecons.Unique instance doesn't compile, needs std.stdio
Oct 22, 2012
earthfront
Oct 22, 2012
earthfront
Feb 04, 2013
Andrej Mitrovic
October 22, 2012
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


--- Comment #0 from earthfront <earthfront@gmail.com> 2012-10-22 09:50:03 PDT ---
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: -------
October 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8869



--- Comment #1 from earthfront <earthfront@gmail.com> 2012-10-22 09:56:32 PDT ---
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: -------
February 04, 2013
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


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-04 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: -------