[Issue 19879] New: std.concurrency: Emit offending field name when failing to spawn() with mutable thread-local data
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 16 08:46:41 UTC 2019
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 at puremagic.com
Reporter: andrej.mitrovich at 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.
--
More information about the Digitalmars-d-bugs
mailing list