Files
swift-mirror/test/decl/protocol/inherited.swift
Doug Gregor feb1b55de2 [Name lookup] Look through parentheses when finding type references.
When resolving type declarations in, e.g., the inherited type declarations
request, look through parenthesized types. Fixes rdar://problem/45527696.
2018-10-24 14:02:24 -07:00

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
}