We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b91a00 commit 37aacfcCopy full SHA for 37aacfc
src/expression.c
@@ -8971,9 +8971,10 @@ Expression *AssignExp::semantic(Scope *sc)
8971
{
8972
// Deal with AAs (Bugzilla 2451)
8973
// Rewrite as:
8974
- // e1 = (typeof(e2) tmp = void, tmp = e2, tmp);
+ // e1 = (typeof(aa.value) tmp = void, tmp = e2, tmp);
8975
+ Type * aaValueType = ((TypeAArray *)((IndexExp*)e1)->e1->type->toBasetype())->next;
8976
Identifier *id = Lexer::uniqueId("__aatmp");
- VarDeclaration *v = new VarDeclaration(loc, e2->type,
8977
+ VarDeclaration *v = new VarDeclaration(loc, aaValueType,
8978
id, new VoidInitializer(NULL));
8979
v->storage_class |= STCctfe;
8980
0 commit comments