[Issue 15558] New: std.parallelism giving inscrutable error messages
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 12 05:34:08 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15558
Issue ID: 15558
Summary: std.parallelism giving inscrutable error messages
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: deadalnix at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list