Comment #0 by andrej.mitrovich — 2019-05-16T08:46:41Z
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.
Comment #1 by andrej.mitrovich — 2019-06-17T06:42:21Z
Alternative:
Make the ` hasLocalAliasing` function public. That way we can add the check to composite types on our own.
Comment #2 by andrej.mitrovich — 2019-06-17T06:43:09Z
Actually I've just noticed it just uses std.traits.hasUnsharedAliasing internally, so never mind about the last suggestion.
Comment #3 by robert.schadek — 2024-12-01T16:35:02Z