digitalmars.D.bugs - [Issue 15558] New: std.parallelism giving inscrutable error messages
- via Digitalmars-d-bugs (33/33) Jan 12 2016 https://issues.dlang.org/show_bug.cgi?id=15558
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 puremagic.com Reporter: deadalnix 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. --
Jan 12 2016