mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rather than always using depth 0 for the Self generic type parameter of a protocol, which is the correct value in well-formed code, actually compute the depth based on the context. This maintains the depth invariants of the AST in ill-formed code, resolving a large number of crashers (169), including rdar://problem/21042357, and regresses one crasher. Swift SVN r28920
10 lines
139 B
Swift
10 lines
139 B
Swift
// RUN: not %target-swift-frontend %s -parse
|
|
|
|
protocol A {}
|
|
extension A {
|
|
final func f() {}
|
|
protocol B {
|
|
func f()
|
|
}
|
|
struct S : A, B {}
|