[Issue 17472] New: [Reg 2.075] typeof(stdin) is no longer a File
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jun 6 15:05:45 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17472
Issue ID: 17472
Summary: [Reg 2.075] typeof(stdin) is no longer a File
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
import std.stdio;
private void threadWriter(alias OUT, alias ERR)()
{
OUT = typeof(OUT)("/dev/null", "w");
ERR = typeof(ERR)("/dev/null", "w");
}
alias stdWriter = threadWriter!(stdout, stderr);
CODE
dmd -c bug
----
/home/dawg/Code/D/bug.d(5): Error: expected 0 arguments, not 2 for non-variadic
function type nothrow @nogc ref @system File()
/home/dawg/Code/D/bug.d(6): Error: expected 0 arguments, not 2 for non-variadic
function type nothrow @nogc ref @system File()
/home/dawg/Code/D/bug.d(9): Error: template instance
bug.threadWriter!(makeGlobal, makeGlobal) error instantiating
----
Breaks https://github.com/atilaneves/unit-threaded.
Happens because stdin is now an alias.
alias stdin = makeGlobal!(core.stdc.stdio.stdin);
Introduced with https://github.com/dlang/phobos/pull/5421
--
More information about the Digitalmars-d-bugs
mailing list