[Issue 19064] [REG2.081] Vibe.d's InterfaceProxy no longer works
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 5 13:10:20 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19064
--- Comment #1 from Seb <greeenify at gmail.com> ---
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.
--
More information about the Digitalmars-d-bugs
mailing list