fix(rsx): formatted attribute merging #3719
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attributes are merged in
Element::merge_attributes
,out
'ssource
is not updated (I don't know if it should) and even if the segments are trivial, sincesource
is empty we cannot consider it as a "simple expression" byis_simple_expr
.This would result in an issue when merging the following classes with me output being empty:
I also modified the
merges_attributes
test splitting it into different cases:merge_trivial_attributes
: merge between two literalsmerge_formatted_attributes
: merge between a literal and a formattedmerge_conditional_attributes
: merge between a literal and two conditionalsmerge_all_attributes
: merge between all of the above