Commit a16fead
Fix error position reporting on classes (PowerShell#3103)
Interactive hosts expect an `IncompleteParseException` to signal that more input is expected.
When detecting errors, the parser can report 2 positions:
* where the error should be reported
* where the error was detected
Typically these are the same, so most error reporting methods have a single parameter.
For missing braces, the pattern is supposed to be to report the error after the opening brace, but the error is typically detected at the end of the file.
There were a few places where we were not consistent in reporting such errors, this PR corrects those places.1 parent ca5fc9c commit a16fead
6 files changed
Lines changed: 16 additions & 12 deletions
File tree
- src/System.Management.Automation
- engine/parser
- resources
- test/powershell/Language
- Classes
- Parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3909 | 3909 | | |
3910 | 3910 | | |
3911 | 3911 | | |
3912 | | - | |
| 3912 | + | |
3913 | 3913 | | |
3914 | 3914 | | |
3915 | 3915 | | |
| |||
4269 | 4269 | | |
4270 | 4270 | | |
4271 | 4271 | | |
4272 | | - | |
| 4272 | + | |
4273 | 4273 | | |
4274 | 4274 | | |
4275 | 4275 | | |
| |||
6344 | 6344 | | |
6345 | 6345 | | |
6346 | 6346 | | |
6347 | | - | |
6348 | | - | |
| 6347 | + | |
| 6348 | + | |
6349 | 6349 | | |
6350 | 6350 | | |
6351 | 6351 | | |
| |||
6394 | 6394 | | |
6395 | 6395 | | |
6396 | 6396 | | |
6397 | | - | |
| 6397 | + | |
6398 | 6398 | | |
6399 | 6399 | | |
6400 | 6400 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | 350 | | |
354 | 351 | | |
355 | 352 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
0 commit comments