mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When resolving type declarations in, e.g., the inherited type declarations request, look through parenthesized types. Fixes rdar://problem/45527696.
15 lines
266 B
Swift
15 lines
266 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// Allow inheritance from parenthesized protocol names.
|
|
protocol DefaultItem {}
|
|
|
|
extension DefaultItem {
|
|
var isEnabled: Bool { return true }
|
|
}
|
|
|
|
protocol Item: (DefaultItem) {}
|
|
|
|
func test(item: Item) {
|
|
_ = item.isEnabled
|
|
}
|