Skip to content

Commit

Permalink
Fix bugzilla 24790 - -vcg-ast ICE on lowered assign exp (dlang#16914)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
  • Loading branch information
2 people authored and thewilsonator committed Oct 7, 2024
1 parent 0d6332e commit 1bd76dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dmd/parse.d
Original file line number Diff line number Diff line change
Expand Up @@ -9774,6 +9774,7 @@ immutable PREC[EXP.max + 1] precedence =
EXP.assign : PREC.assign,
EXP.construct : PREC.assign,
EXP.blit : PREC.assign,
EXP.loweredAssignExp : PREC.assign,
EXP.addAssign : PREC.assign,
EXP.minAssign : PREC.assign,
EXP.concatenateAssign : PREC.assign,
Expand Down
5 changes: 5 additions & 0 deletions compiler/test/compilable/vcg-ast-arraylength.d
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ void main()

static assert(is(typeof(a.length = 0) == size_t));
static assert(is(typeof(a.length = f.length = 0) == size_t));

// https://issues.dlang.org/show_bug.cgi?id=24790
struct S { int[] payload; }
S s;
s.payload.length += 3;
}

0 comments on commit 1bd76dc

Please sign in to comment.