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:
@@ -163,7 +163,7 @@ func rdar20142523() {
|
||||
// <rdar://problem/21080030> Bad diagnostic for invalid method call in boolean expression: (_, ExpressibleByIntegerLiteral)' is not convertible to 'ExpressibleByIntegerLiteral
|
||||
func rdar21080030() {
|
||||
var s = "Hello"
|
||||
if s.characters.count() == 0 {} // expected-error{{cannot call value of non-function type 'IndexDistance'}}{{24-26=}}
|
||||
if s.characters.count() == 0 {} // expected-error{{cannot call value of non-function type 'String.CharacterView.IndexDistance'}}{{24-26=}}
|
||||
}
|
||||
|
||||
// <rdar://problem/21248136> QoI: problem with return type inference mis-diagnosed as invalid arguments
|
||||
|
||||
Reference in New Issue
Block a user