Repository navigation
Commit e0f0867
committed
fix(extractor): scan every partial declaration for the AssociatedObject field proof (#227)
FieldAssignedOnlyFromAssociatedObject walked only the one class declaration holding
the `+=`, so for a `partial` Behavior a disqualifying injected write to the field in
a sibling partial FILE was invisible — the field could pass as an AssociatedObject
alias while actually being injected elsewhere (same class of hole CodeRabbit flagged
on the #229 sibling). It now scans every partial declaration of the field's
containing type via the symbol's DeclaringSyntaxReferences (the merged compilation
makes them all reachable), each with its own tree's semantic model.
New flagged control PartialFieldBehavior (field assigned from AssociatedObject in one
partial, from an injected value in the other) + a CI assertion. Verified with the
real extractor: all six controls warn, the three positives stay silent;
full-sample-set output byte-identical to main. Gates: run_tests 276/276, ruff, mypy,
yaml all green.
Refs #227
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U2AWb9N2VUsby2XpdftBcu1 parent e3ec4fc commit e0f0867
3 files changed
Lines changed: 57 additions & 13 deletions
File tree
- .github/workflows
- frontend/roslyn
- OwnSharp.Extractor
- samples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
917 | 922 | | |
918 | 923 | | |
919 | 924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
| 1121 | + | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1131 | 1134 | | |
1132 | | - | |
| 1135 | + | |
1133 | 1136 | | |
1134 | 1137 | | |
1135 | | - | |
| 1138 | + | |
1136 | 1139 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1144 | 1151 | | |
1145 | 1152 | | |
1146 | 1153 | | |
1147 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1148 | 1164 | | |
1149 | 1165 | | |
1150 | 1166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
158 | 181 | | |
0 commit comments