You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support disambiguating links with type signature information (#643)
* Experimental support for disambiguating links with type signatures
rdar://112224233
* Add a more robust parser for type signature disambiguation in the link
* Support function signature disambiguation for external links
* Fix parsing of subtract operators with parameter type disambiguation
* Only use hash and kind disambiguation in topic references and URLs
* Display function signature in PathHierarchy debug dump
* Update tests for subscripts with type signature disambiguation
* Improve presentation of solutions for ambiguous links on command line
* Update tests to expect the added space in the warning summary
* Extract the full type from the function signature for disambiguation
* Update new code to account for C++ operator parsing logic
* Handle disambiguation in error messages more consistently.
Also, format the error message better in single-line presentation
* Fix new bug where overload groups prevent type disambiguation for one of the overloaded symbols
Also, improve paths for overload groups and other preferred symbols
* Add convenience accessors for inspecting node's special behaviors
* Extract private `onlyIndex(where:)` utility
* Remove accidental print statement
* Reimplement private `typesMatch` helper using `allSatisfy`
* Fix typo and missing info in implementation code comment.
* Create an empty substring using the standard initializer
* Extract common code for disambiguating by type signature
* Change `typeSpellings(for:)` to specify _included_ token kinds
* Add examples of disambiguation string in code comment
* Avoid creating disambiguation string to find `Disambiguation.none`
/// - fullNameOfNode: A closure that determines the full name of a node, to be displayed in collision diagnostics to precisely identify symbols and other pages.
81
82
/// - Note: `Replacement`s produced by this function use `SourceLocation`s relative to the link text excluding its surrounding syntax.
// In contexts that display the solution message on a single line by removing newlines, this extra whitespace makes it look correct ─────────────╮
110
+
// ▼
111
+
returnSolution(summary:"\(Self.replacementOperationDescription(from: foundDisambiguation, to: suggestedDisambiguation, forCollision:true)) for \n\(fullName.singleQuoted)", replacements:[
\(disambiguations.dropFirst().singleQuoted) isn't a disambiguation for \(nextPathComponent.name.singleQuoted) at \(partialResult.node.pathWithoutDisambiguation().singleQuoted)
177
+
\(foundDisambiguation.dropFirst().singleQuoted) isn't a disambiguation for \(nextPathComponent.name.singleQuoted) at \(partialResult.node.pathWithoutDisambiguation().singleQuoted)
0 commit comments