mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Existential types don't support nested types so let's not allow the lookup to make such access, with only exception for typealias or associated types without type parameters, they are currently allowed. Resolves: rdar://problem/38505436
24 lines
243 B
Swift
24 lines
243 B
Swift
// RUN: not %target-typecheck-verify-swift %s
|
|
|
|
protocol P1 {
|
|
class N1 {
|
|
init() {}
|
|
}
|
|
}
|
|
|
|
protocol P2 {}
|
|
|
|
extension P2 {
|
|
class N2 {
|
|
init() {}
|
|
}
|
|
}
|
|
|
|
class C1: P1.N1 {
|
|
override init() {}
|
|
}
|
|
|
|
class C2: P2.N2 {
|
|
override init() {}
|
|
}
|