Bug 8869 – std.typecons.Unique instance doesn't compile, needs std.stdio

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-10-22T09:50:00Z
Last change time
2013-02-04T12:48:24Z
Assigned to
nobody
Creator
earthfront

Comments

Comment #0 by earthfront — 2012-10-22T09:50:03Z
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.
Comment #1 by earthfront — 2012-10-22T09:56:32Z
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.
Comment #2 by andrej.mitrovich — 2013-02-04T12:48:24Z
Fixed since 2.060.