Commit e3ec4fc
committed
fix(extractor): resolve AssociatedObject's binding before exempting it (#227, Codex P2)
IsAssociatedObjectAccess matched the identifier `AssociatedObject` purely by text,
so a local, a parameter, or a hidden member DECLARED in the Behavior subclass named
`AssociatedObject` — holding an injected publisher, not the inherited accessor —
would wrongly pass the self-owned-source gate (`void Wire(UiElement AssociatedObject)
{ AssociatedObject.Loaded += H; }`). That source is not co-lifetimed with the
behavior, so the subscription must stay flagged.
The name match now consults the symbol: the genuine base accessor is either
UNRESOLVED (null — the Interactivity assembly is absent on the runner, the normal
WPF case) or an INHERITED member (containing type is a base, not this class); a
local/parameter binding, or a member declared on this class, is a shadow and denies
the exemption. Conservative — an unresolvable symbol keeps today's behaviour.
New flagged control ShadowParamBehavior (a parameter named AssociatedObject) +
a CI assertion. Verified with the real extractor: all five controls warn, the three
positives stay silent; full-sample-set output still byte-identical to main.
Refs #227
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U2AWb9N2VUsby2XpdftBcu1 parent aa1af42 commit e3ec4fc
3 files changed
Lines changed: 48 additions & 7 deletions
File tree
- .github/workflows
- frontend/roslyn
- OwnSharp.Extractor
- samples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1048 | 1058 | | |
1049 | 1059 | | |
1050 | | - | |
| 1060 | + | |
1051 | 1061 | | |
1052 | 1062 | | |
1053 | 1063 | | |
1054 | 1064 | | |
1055 | 1065 | | |
1056 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1057 | 1079 | | |
1058 | 1080 | | |
1059 | 1081 | | |
| |||
1070 | 1092 | | |
1071 | 1093 | | |
1072 | 1094 | | |
1073 | | - | |
| 1095 | + | |
1074 | 1096 | | |
1075 | 1097 | | |
1076 | 1098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
144 | 158 | | |
0 commit comments