Fix inheriting prototypeAttrs and automergeAttrs.

Review Request #13217 — Created Aug. 15, 2023 and submitted

Information

Spina
master

Reviewers

When support for prototypeAttrs and automergeAttrs were added, the
intent was for these to be inherited in any subclasses, even if
overridden. However, some logic issues prevented this from working
correctly.

The values from either the parent or subclass's lists were only being
populated if we found the value explicitly set in the subclass. And then
if a subclass set a list, it would likely override the parent's.

We now track any unique values we know we want copied into the subclass,
regardless of whether we copied the corresponding attribute values,
giving us a comprehensive final list.

Unit tests pass.

Summary ID
Fix inheriting prototypeAttrs and automergeAttrs.
When support for `prototypeAttrs` and `automergeAttrs` were added, the intent was for these to be inherited in any subclasses, even if overridden. However, some logic issues prevented this from working correctly. The values from either the parent or subclass's lists were only being populated if we found the value explicitly set in the subclass. And then if a subclass set a list, it would likely override the parent's. We now track any unique values we know we want copied into the subclass, regardless of whether we copied the corresponding attribute values, giving us a comprehensive final list.
7e19cc1b6208edc665074d937178b74b26ea0eed
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (8937a6d)