Closed
Description
should struct fields and array elements be dropped in reverse declaration order (a la C++) ?
#16493 made us internally consistent with respect to struct fields, but chose to make the drops follow declaration order.
Note struct construction follows the order of the fields given at the construction site, so there's no way to ensure that the drop order is the reverse of the order used at the construction site.
But we should still think about whether we should change that. That is, if local variables are dropped in reverse declaration order (even though they can be initialized in any order), then it seems like it would make sense to do the same thing for struct fields.
Metadata
Metadata
Assignees
Labels
No labels