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


--- Comment #0 from bearophile_hugs eml.cc 2010-02-18 12:42:29 PST ---
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


--- Comment #1 from yebblies <yebblies gmail.com> 2012-02-03 17:55:29 EST ---
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