| 1 | // Repro for method-call scope alignment range sync: when |
| 2 | // AlignMethodCallScopes merges scopes for a method call and its |
| 3 | // computed property, the updated scope range must be propagated |
| 4 | // to identifier mutable_ranges so later passes see correct ranges. |
| 5 | |
| 6 | function Component({items}) { |
| 7 | const filtered = items.filter(x => x.active); |
| 8 | const mapped = filtered.map(x => x.name); |
| 9 | const sorted = mapped.sort(); |
| 10 | return <List items={sorted} />; |
| 11 | } |
| 12 | |
| 13 | export const FIXTURE_ENTRYPOINT = { |
| 14 | fn: Component, |
| 15 | params: [ |
| 16 | { |
| 17 | items: [ |
| 18 | {active: true, name: 'a'}, |
| 19 | {active: false, name: 'b'}, |
| 20 | ], |
| 21 | }, |
| 22 | ], |
| 23 | }; |