www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5448] New: Array of AAs literal doesn't work

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

           Summary: Array of AAs literal doesn't work
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This D2 program:

void main() {
    pragma(msg, typeof([[1: 2]]).stringof);
    int[int][] aaa = [[1: 2]];
}


DMD 2.051 prints:
int[int][]
test.d(3): Error: cannot use array to initialize int[int]
test.d(3): Error: cannot implicitly convert expression ([(__error)]) of type
int[int][] to int[int][]

So the literal seems correctly recognized.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5448


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



14:55:56 PST ---
But this works:

void main()
{
    pragma(msg, typeof([[1: 2]]).stringof);
    int[int][] aaa = [[1: 2]].dup;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 16 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5448


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |yebblies gmail.com
           Platform|x86                         |All
         AssignedTo|nobody puremagic.com        |yebblies gmail.com
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/683

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 01 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5448




*** Issue 3828 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5448




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f1e11a6918747bd9de722ecf02a42233fda01e2b
Issue 5448 - Array of AAs literal doesn't work

When an assoc array literal is mistakenly parsed as an array literal,
reinterpret it during semantic.

https://github.com/D-Programming-Language/dmd/commit/042038f08c77a8566d5cf8e423b004c24ee7efc9


Issue 5448 - Array of AAs literal doesn't work

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 12 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5448


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



D1 fix:
https://github.com/D-Programming-Language/dmd/commit/7268fce0fb1c5f23e25271fc6828ecbad1330f1a

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