www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3828] New: A failure in AA literals

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3828

           Summary: A failure in AA literals
           Product: D
           Version: 2.040
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: sean invisibleduck.org
        ReportedBy: bearophile_hugs eml.cc



This works:
void main() {
    int[string][] a1 = [["cc":0]];
}

This doesn't work:
void main() {
    int[string][] a2 = [["cc":0], ["DD":10]];
}

Gives:
test.d(3): Error: Integer constant expression expected instead of "cc"
test.d(3): Error: Integer constant expression expected instead of "cc"
Error: incompatible types for (([0]) ? (["DD":10])): 'int[1u]' and
'int[string]'
test.d(3): Error: cannot implicitly convert expression ([(__error),(__error)])
of type int[2u] to int[string][]
Error: cannot cast int to int[string]
Error: cannot cast int to int[string]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3828


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE



Folded into issue 5448.

*** This issue has been marked as a duplicate of issue 5448 ***

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