Bug 21663 – std.concurrency.receiveOnly doesn't work with tuples

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2021-02-25T16:45:44Z
Last change time
2021-03-06T00:58:50Z
Keywords
pull
Assigned to
No Owner
Creator
deadalnix

Comments

Comment #0 by deadalnix — 2021-02-25T16:45:44Z
See sample code: int main() { import std.concurrency; receiveOnly!(string, bool, bool); return 0; } This works in 2.094 (and the application from which it is extracted also works) but fails with the following error in 2.095: /usr/include/dmd/phobos/std/concurrency.d(806): Error: template instance isAssignable!(string, bool, bool) does not match template declaration isAssignable(Lhs, Rhs = Lhs) test.d(3): Error: template instance std.concurrency.receiveOnly!(string, bool, bool) error instantiating I have no idea what this error really mean if I'm honest.
Comment #1 by snarwin+bugzilla — 2021-02-25T16:53:44Z
Looks like `recieveOnly` is using `isAssignable!T` where it should be using `allSatisfy!(isAssignable, T)`: https://github.com/dlang/phobos/blob/v2.095.1/std/concurrency.d#L806
Comment #2 by snarwin+bugzilla — 2021-02-25T16:57:39Z
Comment #3 by dlang-bot — 2021-02-25T17:46:57Z
@pbackus created dlang/phobos pull request #7813 "Fix issue 21663 - std.concurrency.receiveOnly doesn't work with tuples" fixing this issue: - Fix issue 21663 - std.concurrency.receiveOnly doesn't work with tuples https://github.com/dlang/phobos/pull/7813
Comment #4 by dlang-bot — 2021-03-01T18:24:29Z
dlang/phobos pull request #7813 "Fix issue 21663 - std.concurrency.receiveOnly doesn't work with tuples" was merged into stable: - 1a28dfed51a870385f96a833e6c844186ef01e43 by Paul Backus: Fix issue 21663 - std.concurrency.receiveOnly doesn't work with tuples https://github.com/dlang/phobos/pull/7813
Comment #5 by dlang-bot — 2021-03-06T00:58:50Z
dlang/phobos pull request #7830 "merge stable" was merged into master: - 6e6e024fa3776ffb6da36c97c363288de4c321da by Paul Backus: Fix issue 21663 - std.concurrency.receiveOnly doesn't work with tuples https://github.com/dlang/phobos/pull/7830