Commit e3b113f
committed
File::getMethodParameters(): bug fix for attributes leaking into type hint
This commit adds handling of parameter attributes to the `File::getMethodParameters()` method as per option [2] discussed in issue 3298.
In practice this means that:
* [New] A new `attributes` index is introduced into the returned array which will hold a boolean value indicating whether attributes are attached to the parameter.
* [Unchanged] The `content` index in the returned array includes the textual representation of any attributes attached to a parameter.
* [Fixed] The `type_hint` and `type_hint_token` indexes will no longer be polluted (set incorrectly) with information belonging to the attribute(s) instead of to the type declaration.
Includes minor efficiency fix for handling of parenthesis and brackets in default values.
Includes dedicated unit test.
Fixes 32981 parent e4af9dc commit e3b113f
File tree
3 files changed
+135
-3
lines changed- src/Files
- tests/Core/File
3 files changed
+135
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1283 | 1283 | | |
1284 | 1284 | | |
1285 | 1285 | | |
| 1286 | + | |
1286 | 1287 | | |
1287 | 1288 | | |
1288 | 1289 | | |
| |||
1355 | 1356 | | |
1356 | 1357 | | |
1357 | 1358 | | |
| 1359 | + | |
1358 | 1360 | | |
1359 | 1361 | | |
1360 | 1362 | | |
| |||
1373 | 1375 | | |
1374 | 1376 | | |
1375 | 1377 | | |
1376 | | - | |
| 1378 | + | |
| 1379 | + | |
1377 | 1380 | | |
1378 | 1381 | | |
1379 | 1382 | | |
1380 | 1383 | | |
1381 | | - | |
1382 | 1384 | | |
1383 | | - | |
| 1385 | + | |
| 1386 | + | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
1387 | 1390 | | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1388 | 1397 | | |
1389 | 1398 | | |
1390 | 1399 | | |
| |||
1501 | 1510 | | |
1502 | 1511 | | |
1503 | 1512 | | |
| 1513 | + | |
1504 | 1514 | | |
1505 | 1515 | | |
1506 | 1516 | | |
| |||
1526 | 1536 | | |
1527 | 1537 | | |
1528 | 1538 | | |
| 1539 | + | |
1529 | 1540 | | |
1530 | 1541 | | |
1531 | 1542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
0 commit comments