www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7711] New: ICE when trying to use an AA with inout type.

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

           Summary: ICE when trying to use an AA with inout type.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



Test case:

---------------------------------------------
inout(int) test7711a(inout(int) bb) {
    inout(long[long]) r;
    r.keys;
    return 0;
}
---------------------------------------------

Compiling this causes

dmd: mtype.c:4449: StructDeclaration* TypeAArray::getImpl(): Assertion `impl'
failed.
Aborted

Because AssociativeArray!(long, inout(long)) cannot be instantiated:

object.di(386): Error: variable
object.AssociativeArray!(long,inout(long)).AssociativeArray.Slot.value only
parameters or stack based variables can be inout
object.di(452): Error: inout on return means inout must be on a parameter as
well for  property inout(long)[long]()
object.di(458): Error: inout on return means inout must be on a parameter as
well for  property inout(long)[]()
object.di(483): Error: inout on return means inout must be on a parameter as
well for pure  safe inout(long)()
object.di(530): Error: inout on return means inout must be on a parameter as
well for Value()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7711


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



Works in git master

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