Bug 7711 – ICE when trying to use an AA with inout type.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-14T13:29:00Z
Last change time
2012-03-30T16:42:45Z
Keywords
ice
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2012-03-14T13:29:54Z
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()
Comment #1 by clugdbug — 2012-03-30T16:42:45Z
Works in git master