Skip to content

Commit

Permalink
Test key insertion is safe, not just values.front
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed Jul 31, 2024
1 parent 8fcf8fa commit cedc718
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion std/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ if (isInputRange!Values && isInputRange!Keys)
alias ValueElement = ElementType!Values;
static if (hasElaborateDestructor!ValueElement)
ValueElement.init.__xdtor();
cast(void) values.front;

aa[key] = values.front;
})))
{
() @trusted {
Expand Down

0 comments on commit cedc718

Please sign in to comment.