Commit 4fd6208
Emery Conrad
Reset sticky diagnostic state after a rejected InstantiateTemplate
The rejection (e.g. a type argument for a non-type parameter) emits its
error diagnostic outside any incremental parse, and DiagnosticsEngine's
ErrorOccurred flag is sticky: the next IncrementalParser::Parse reported
the stale flag as its own failure and then soft-reset it, poisoning
exactly one parse. Contain the rejection with a DiagnosticErrorTrap-based
RAII that restores a clean diagnostic state when the instantiation
introduced errors - the same cleanup IncrementalParser performs on a real
parse failure and InstantiateFunctionDefinition performs inline.
Co-developed-with-the-help-of: Claude Code (Fable 5, human in the loop)1 parent 3103be9 commit 4fd6208
2 files changed
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5206 | 5206 | | |
5207 | 5207 | | |
5208 | 5208 | | |
| 5209 | + | |
| 5210 | + | |
| 5211 | + | |
| 5212 | + | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
| 5217 | + | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + | |
| 5221 | + | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
| 5225 | + | |
| 5226 | + | |
| 5227 | + | |
| 5228 | + | |
| 5229 | + | |
| 5230 | + | |
| 5231 | + | |
| 5232 | + | |
| 5233 | + | |
| 5234 | + | |
| 5235 | + | |
| 5236 | + | |
| 5237 | + | |
5209 | 5238 | | |
5210 | 5239 | | |
5211 | 5240 | | |
| |||
5303 | 5332 | | |
5304 | 5333 | | |
5305 | 5334 | | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
| 5338 | + | |
5306 | 5339 | | |
5307 | 5340 | | |
5308 | 5341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1245 | 1245 | | |
1246 | 1246 | | |
1247 | 1247 | | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1248 | 1272 | | |
1249 | 1273 | | |
1250 | 1274 | | |
| |||
0 commit comments