[Issue 11126] Link failure when instancing anonymous class to a static variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 20 03:40:34 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11126


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com


--- Comment #1 from yebblies <yebblies at gmail.com> 2013-11-20 22:40:33 EST ---
Now gives

testx.d(325): Error: variable testx.main.c is mutable. Only const or immutable
class thread local variable are allowed, not testx.main.__anonclass1

And with:

class C {}

void main()
{
    static immutable C c = cast(immutable)new class C {};
}

it appears to work.  Can't get a link failure, on win32.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list