May 16, 2019 [Issue 19879] New: std.concurrency: Emit offending field name when failing to spawn() with mutable thread-local data | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19879 Issue ID: 19879 Summary: std.concurrency: Emit offending field name when failing to spawn() with mutable thread-local data Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: andrej.mitrovich@gmail.com This message should be improved: ----- /usr/local/opt/dmd/include/dlang/dmd/std/concurrency.d(449,5): Error: static assert: "Aliases to mutable thread-local data not allowed." mod.d(171,30): instantiated from here: `spawn!(void function(Config) @system, Config)` mod2.d(48,25): instantiated from here: `__ctor!(Config)` ----- It doesn't say which field is the offending one, just that there is some pointer or array somewhere, but it's really hard to determine what is the offending field when the data structure is complex. With all the traits power D has, emitting the field name should be possible. -- |
Copyright © 1999-2021 by the D Language Foundation