mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 13:40:11 +03:00
Fix bugzilla 24845 - Compiler error when trying to assign to an AA value of an enum instance
This commit is contained in:
parent
949cb11c41
commit
519d388498
3 changed files with 9 additions and 6 deletions
|
@ -4143,10 +4143,9 @@ extern (C++) final class IndexExp : BinExp
|
|||
|
||||
override bool isLvalue()
|
||||
{
|
||||
if (e1.op == EXP.assocArrayLiteral)
|
||||
return false;
|
||||
if (e1.type.ty == Tsarray ||
|
||||
(e1.op == EXP.index && e1.type.ty != Tarray))
|
||||
auto t1b = e1.type.toBasetype();
|
||||
if (t1b.isTypeAArray() || t1b.isTypeSArray() ||
|
||||
(e1.isIndexExp() && t1b != t1b.isTypeDArray()))
|
||||
{
|
||||
return e1.isLvalue();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue