mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ASTPrinter] Fix printing of nested typealias types and make it consistent with printing of nominal types.
This fixes several issues: - By default parent types of alias types are not printed which results in - Erroneous fixits, for example when casting to 'Notification.Name' from a string, which ends up adding erroneous cast as "Name(rawValue: ...)" - Hard to understand types in code-completion results and diagnostics - When printing with 'fully-qualified' option typealias types are printed erroneously like this "<PARENT>.Type.<TYPEALIAS>" The change make typealias printing same as nominal types and addresses the above.
This commit is contained in:
@@ -16,8 +16,8 @@ var x: Int
|
||||
// Check that extensions of nested decls are showing up.
|
||||
// CHECK-STDLIB-LABEL: extension String.UTF16View.Index {
|
||||
// CHECK-STDLIB: func samePosition(in utf8: String.UTF8View) -> String.UTF8View.Index?
|
||||
// CHECK-STDLIB: func samePosition(in unicodeScalars: String.UnicodeScalarView) -> UnicodeScalarIndex?
|
||||
// CHECK-STDLIB: func samePosition(in characters: String) -> Index?
|
||||
// CHECK-STDLIB: func samePosition(in unicodeScalars: String.UnicodeScalarView) -> String.UnicodeScalarIndex?
|
||||
// CHECK-STDLIB: func samePosition(in characters: String) -> String.Index?
|
||||
// CHECK-STDLIB-NEXT: }
|
||||
|
||||
// CHECK-MUTATING-ATTR: mutating func
|
||||
|
||||
Reference in New Issue
Block a user