Repository navigation
fix: Resolve duplicate materializedProvider local in ResourceDictionary - #23500
carldebilly merged 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a CS0136 build break in ResourceDictionary.TryMaterializeLazy by eliminating a pattern-variable name collision introduced by merged changes, restoring successful compilation for Skia and Reference targets.
Changes:
- Renamed the
finally-block pattern variable frommaterializedProvidertostoreProviderto avoid scope collision with the latermaterializedProviderdeclaration. - Kept behavior unchanged (same
IDependencyObjectStoreProvidercast andIsResourceDictionaryItemassignment).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23500/wasm-skia-net9/index.html |
The merge of upstream PR unoplatform#23500 (fix: Resolve duplicate materializedProvider local) left both the old 'materializedNewValueProvider' branch and the upstream 'storeProvider' branch in ResourceDictionary.cs, with broken closing-brace indentation that tripped IDE0055 in Analyze (csharp). Co-authored-by: Copilot <[email protected]>
|
@mergify backport release/stable/6.6 |
✅ Backports have been createdDetails
Cherry-pick of bbea80b has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
GitHub Issue: closes #23499
PR Type:
🐞 Bugfix
What changed? 🚀
Fixes a CS0136 build break in
ResourceDictionary.csthat fails CI (and localmasterbuilds) for the Skia and Referencenet10.0targets:This is a merge-time collision, not a defect in either change on its own. Two independently-merged PRs each introduced a pattern variable named
materializedProvider:fix(theming): resolve binding & resource ThemeResource against owner theme(84a8eadd1f) —if (value is IDependencyObjectStoreProvider materializedProvider ...)in the enclosing block scope, after thetry/finally.fix(alc): resources must not inherit DataContext from their host subtree(58a07c27d2) —else if (newValue is IDependencyObjectStoreProvider materializedProvider)inside the nestedfinallyblock.A pattern variable in the enclosing block has scope spanning the rest of that block, so the inner-scope (
finally) declaration collides with it even though it appears textually earlier. Each branch compiled cleanly in isolation; the conflict only surfaced once both landed onmaster.This PR renames the
finally-block occurrence tostoreProvider. The two are independent casts toIDependencyObjectStoreProviderof different values (newValuevsvalue), so the rename is a pure scoping fix with no behavioral change.PR Checklist ✅
Screenshots Compare Test Runresults.