[Issue 2054] Const system broken on struct assignment.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 28 17:07:51 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2054





------- Comment #1 from simen.kjaras at gmail.com  2008-04-28 19:07 -------
(In reply to comment #0)
> void main()
> {
>         char ch = 'd';
>         invariant Struct iStruct = {&ch};

I would believe this to be just as wrong. Mutable is not implicitly castable to
invariant, and ch might change even though iStruct assumes it does not.


-- 



More information about the Digitalmars-d-bugs mailing list