Bug 19064 – [REG2.081] getOverloads traits returns empty tuples for void functions

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-07-05T12:48:28Z
Last change time
2018-07-11T11:43:38Z
Assigned to
No Owner
Creator
Seb

Attachments

IDFilenameSummaryContent-TypeSize
1709vibe.minimal.tgzA half-reduced version of Vibe.dapplication/x-compressed-tar8740

Comments

Comment #0 by greeenify — 2018-07-05T12:48:28Z
Created attachment 1709 A half-reduced version of Vibe.d Introduced by https://github.com/dlang/dmd/pull/7959 I'm still trying to reduce vibe-core, it's a bit difficult because DustMite is pretty greedy and just removing the mixin methods would also lead to the attribute not being found.
Comment #1 by greeenify — 2018-07-05T13:10:20Z
Managed to find the root cause of the regression: cat << EOF > minimal.d enum IOMode { all} struct blocking {} interface InputStream { @safe: @property bool empty(); @property ulong leastSize(); @property bool dataAvailableForRead(); const(ubyte)[] peek(); size_t read(scope ubyte[] dst, IOMode mode); final void read(scope ubyte[] dst) { auto n = read(dst, IOMode.all); assert(n == dst.length); } } interface OutputStream { @safe: size_t write(in ubyte[] bytes, IOMode mode); final void write(in ubyte[] bytes) { auto n = write(bytes, IOMode.all); assert(n == bytes.length); } final void write(in char[] bytes) { write(cast(const(ubyte)[])bytes); } void flush(); void finalize(); } interface Stream : InputStream, OutputStream { } interface ConnectionStream : Stream { @safe: @property bool connected() const; void close(); } static foreach (member; __traits(allMembers, ConnectionStream)) { pragma(msg, __traits(getOverloads, ConnectionStream, member)); } EOF with 2.080.1: --- tuple(connected) tuple(close) tuple(empty) tuple(leastSize) tuple(dataAvailableForRead) tuple(peek) tuple(read, read) tuple(write, write, write) tuple(flush) tuple(finalize) --- with 2.081.0: --- tuple() tuple() tuple(empty) tuple(leastSize) tuple(dataAvailableForRead) tuple(peek) tuple(read, read) tuple(write, write, write) tuple(flush) tuple(finalize) --- That's why the proxy-wrapping doesn't work.
Comment #2 by greeenify — 2018-07-05T13:11:47Z
Comment #3 by razvan.nitu1305 — 2018-07-05T14:52:37Z
Comment #4 by dlang-bugzilla — 2018-07-05T20:00:18Z
(In reply to Seb from comment #0) > I'm still trying to reduce vibe-core, it's a bit difficult because DustMite > is pretty greedy and just removing the mixin methods would also lead to the > attribute not being found. The best way to reduce a regression is to invoke a working and broken compiler in the test script: https://github.com/CyberShadow/DustMite/wiki/Reducing-a-regression-between-two-D-versions
Comment #5 by github-bugzilla — 2018-07-06T01:31:40Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d3f65c73d521f0279c57fec4aec09d03f49b4028 Fix Issue 19064 - [REG2.081] Vibe.d's InterfaceProxy no longer works https://github.com/dlang/dmd/commit/678a445c5a275d7dace466970b48cb2961341cd1 Merge pull request #8456 from RazvanN7/Issue_19064 Fix Issue 19064 - [REG2.081] Vibe.d's InterfaceProxy no longer works merged-on-behalf-of: Sebastian Wilzbach <[email protected]>
Comment #6 by b2.temp — 2018-07-11T11:43:38Z
*** Issue 19076 has been marked as a duplicate of this issue. ***