Bug 15558 – std.parallelism giving inscrutable error messages

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2016-01-12T13:34:08Z
Last change time
2024-12-01T16:25:47Z
Assigned to
No Owner
Creator
deadalnix
Moved to GitHub: phobos#10155 →

Comments

Comment #0 by deadalnix — 2016-01-12T13:34:08Z
struct Host { @disable this(this); } void main() { uint[] arr; import std.parallelism; auto hostmap = taskPool.map!(function Host(uint a) { return Host.init; })(arr); } Gives me: /Library/D/dmd/src/phobos/std/parallelism.d(1677): Error: cannot interpret (uint[], ulong, Host[]) at compile time /Library/D/dmd/src/phobos/std/parallelism.d(1677): Error: static assert __error /Library/D/dmd/src/phobos/std/parallelism.d(1996): instantiated from here: amap!(uint[], ulong, Host[]) fail.d(11): instantiated from here: map!(uint[]) Turns out the @disable this(this); is key in triggering the error.
Comment #1 by robert.schadek — 2024-12-01T16:25:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10155 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB