[Issue 12167] GIT HEAD: AAs are broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 19 02:35:10 PST 2014


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



--- Comment #13 from yebblies <yebblies at gmail.com> 2014-02-19 21:35:04 EST ---
(In reply to comment #12)
> (In reply to comment #11)
> > It works on AA literals, just not on const/immutable AAs, because it may modify
> > data inside them.  If it previously worked on immutable AAs then that was a
> > bug.
> 
> Hmm, so this is resolved invalid?

This one is valid, I guess.

class A {}

immutable A[short] table;
auto a = table.get(10, null);

src\druntime\import\object.di(487):        object.get(T : Value[Key], Value,
Key, K, V)(T* aa, K key, lazy V defaultValue) if (is(typeof(true ? (*aa)[key] :
defaultValue)))

-- 
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