June 06, 2017 [Issue 17472] New: [Reg 2.075] typeof(stdin) is no longer a File | ||||
|---|---|---|---|---|
| ||||
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@puremagic.com Reporter: code@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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply