Commit 51bace6
Nathan Hawes
[IDE][SourceKit/DocSupport] Add members of underscored protocol extensions in extensions of conforming types.
We would previously hide the protocol, its extensions and members, but the '_'
prefix really just means the protocol itself isn't intended for clients, rather
than its members.
This also adds support for 'fully_annotated_decl' entries in doc-info for
extensions to be consistent with every other decl, and removes the
'fully_annotated_generic_signature' entry we supplied as a fallback.
Also fixes several bugs with the synthesized extensions mechanism:
- The type sustitutions applied to the extension's requirements were computed
using the extension itself as the decl context rather than the extension's
nominal. The meant the extension's requirements themselves were assumed to
hold when determining the substitutions, so equality constraints were always
met. Because of this extension members were incorrectly merged with the base
nominal or its extensions despite having additional constraints.
- Types within the requirements weren't being transformed when printed (e.g.
'Self.Element' was printed rather than 'T') both in the interface output and
in the requirements list. We were also incorrectly printing requirements
that were already satisfied once the base type was subsituted in.
- If both the protocol extension and 'enabling' extension of the base nominal
that added the protocol conformance had conditional requirements, we were
only printing the protocol extension's requirements in the synthesized
extension.
- The USR and annotated decl output embedded in the 'key.doc.full_as_xml'
string for synthesized members were printed to match their original context, rather than
the synthesized one.
Resolves rdar://problem/571219371 parent 67d8be7 commit 51bace6
File tree
15 files changed
+3106
-1044
lines changed- include/swift/IDE
- lib
- AST
- IDE
- test
- IDE
- SourceKit
- DocSupport
- Inputs
- tools/SourceKit/lib/SwiftLang
15 files changed
+3106
-1044
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
816 | 820 | | |
817 | 821 | | |
818 | 822 | | |
| |||
872 | 876 | | |
873 | 877 | | |
874 | 878 | | |
875 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
876 | 885 | | |
877 | 886 | | |
878 | 887 | | |
| |||
890 | 899 | | |
891 | 900 | | |
892 | 901 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | 902 | | |
898 | 903 | | |
899 | 904 | | |
| |||
1456 | 1461 | | |
1457 | 1462 | | |
1458 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1459 | 1473 | | |
1460 | 1474 | | |
1461 | 1475 | | |
| |||
1502 | 1516 | | |
1503 | 1517 | | |
1504 | 1518 | | |
1505 | | - | |
1506 | 1519 | | |
1507 | 1520 | | |
1508 | 1521 | | |
| |||
1564 | 1577 | | |
1565 | 1578 | | |
1566 | 1579 | | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | 1580 | | |
1571 | 1581 | | |
1572 | 1582 | | |
| |||
1578 | 1588 | | |
1579 | 1589 | | |
1580 | 1590 | | |
1581 | | - | |
| 1591 | + | |
1582 | 1592 | | |
1583 | 1593 | | |
1584 | 1594 | | |
| |||
1592 | 1602 | | |
1593 | 1603 | | |
1594 | 1604 | | |
1595 | | - | |
| 1605 | + | |
1596 | 1606 | | |
1597 | 1607 | | |
1598 | 1608 | | |
| |||
2180 | 2190 | | |
2181 | 2191 | | |
2182 | 2192 | | |
| 2193 | + | |
2183 | 2194 | | |
2184 | 2195 | | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
2185 | 2239 | | |
2186 | 2240 | | |
2187 | 2241 | | |
2188 | 2242 | | |
2189 | 2243 | | |
2190 | 2244 | | |
2191 | 2245 | | |
2192 | | - | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2193 | 2265 | | |
2194 | 2266 | | |
2195 | 2267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
| |||
362 | 367 | | |
363 | 368 | | |
364 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
365 | 373 | | |
366 | 374 | | |
367 | 375 | | |
| |||
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
404 | 413 | | |
405 | 414 | | |
406 | 415 | | |
| 416 | + | |
| 417 | + | |
407 | 418 | | |
408 | 419 | | |
409 | 420 | | |
| |||
444 | 455 | | |
445 | 456 | | |
446 | 457 | | |
447 | | - | |
| 458 | + | |
| 459 | + | |
448 | 460 | | |
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
452 | 464 | | |
453 | 465 | | |
454 | | - | |
| 466 | + | |
| 467 | + | |
455 | 468 | | |
456 | 469 | | |
457 | 470 | | |
| |||
464 | 477 | | |
465 | 478 | | |
466 | 479 | | |
467 | | - | |
| 480 | + | |
468 | 481 | | |
469 | 482 | | |
470 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
285 | 286 | | |
| 287 | + | |
| 288 | + | |
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
293 | | - | |
294 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
295 | 306 | | |
296 | 307 | | |
297 | 308 | | |
| |||
346 | 357 | | |
347 | 358 | | |
348 | 359 | | |
349 | | - | |
350 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
351 | 364 | | |
352 | 365 | | |
353 | 366 | | |
354 | | - | |
| 367 | + | |
355 | 368 | | |
356 | 369 | | |
357 | 370 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
362 | 383 | | |
363 | 384 | | |
364 | 385 | | |
| |||
431 | 452 | | |
432 | 453 | | |
433 | 454 | | |
434 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
435 | 463 | | |
436 | 464 | | |
437 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
0 commit comments