[Issue 12167] New: GIT HEAD: AAs are broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 14 23:10:10 PST 2014


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

           Summary: GIT HEAD: AAs are broken
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: temtaime at gmail.com


--- Comment #0 from Temtaime <temtaime at gmail.com> 2014-02-14 23:10:07 PST ---
immutable int[int] table;

static this() {
    table = [ 1: 2 ];
    table.rehash;
}

src\druntime\import\object.di(382): Error: cannot implicitly convert expression
(aa) of type immutable(int[int]) to immutable(int)[int]

Error: template instance object.rehash!(immutable(int[int]), immutable(int),
int) error instantiating


-------------------------------------------------------------

Also it rejects previously valid code:
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