[Issue 11714] Improve error message for wrongly initialized thread-local class instances

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 24 12:52:23 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=11714

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #9 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Arguably, pointer to struct initializers suffer from the same problem.
---
module diag;
struct S
{
    int a;
}
S* s = new S;
---
Error: variable diag.s is a pointer to mutable struct. Only pointers to const,
immutable or shared struct thread local variable are allowed, not S*
---

--


More information about the Digitalmars-d-bugs mailing list