http://d.puremagic.com/issues/show_bug.cgi?id=11346
--- Comment #3 from Kenji Hara <[email protected]> 2013-10-25 00:10:47 PDT --- (In reply to comment #2) > That is so non intuitive. A good example how you can make simple code more > complicated. I will wait for the threads in D.learn or possible bug reports > for > that... If multiple initialization for non-mutable field is allowed, it could break type system. For example: struct S { const int[] arr; this(immutable int[] a) { arr = a; // First initialization arr[0] = 1; // Second initialization - modify immutable data! } } Therefore, it's necessary limitation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
