mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Unwind a hack whose stated purpose was to register a potential member edge from an extension to the extended type. In reality, this only registered a plain member dependency on 'deinit'. This edge is insufficient in isolation to cause a rebuild of a dependent file in the case where a type and its extension live in separate files. However, we appear to have been saved by the redundancy in edge registration because the lookup for the extended type will register a top-level or nominal dependency (for an unqualified or qualified reference respectively). The worry there is if a protocol conformance edge *should* flip a previously private nominal dependency edge to a cascading edge. In such a case, the old code would not have been able to make the cascading edge promotion, and we would have potentially miscompiled by not rescheduling dependent jobs.
29 lines
1.6 KiB
Swift
29 lines
1.6 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %{python} %S/../gen-output-file-map.py -o %t %S
|
|
// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -module-name main -verify-incremental-dependencies %s
|
|
|
|
public protocol PublicProtocol { } // expected-provides {{PublicProtocol}}
|
|
internal protocol InternalProtocol { } // expected-provides {{InternalProtocol}}
|
|
fileprivate protocol FilePrivateProtocol { } // expected-provides {{FilePrivateProtocol}}
|
|
private protocol PrivateProtocol { } // expected-provides {{PrivateProtocol}}
|
|
|
|
public struct PublicConformance { } // expected-provides {{PublicConformance}}
|
|
// expected-cascading-member {{main.PublicConformance.init}}
|
|
|
|
// expected-cascading-conformance {{main.PublicConformance}}
|
|
extension PublicConformance: PublicProtocol { }
|
|
extension PublicConformance: InternalProtocol { }
|
|
extension PublicConformance: FilePrivateProtocol { }
|
|
extension PublicConformance: PrivateProtocol { }
|
|
|
|
|
|
private struct PrivateConformance { } // expected-provides {{PrivateConformance}}
|
|
// expected-cascading-member {{main.PrivateConformance.init}}
|
|
|
|
// expected-cascading-conformance {{main.PrivateConformance}}
|
|
extension PrivateConformance: PublicProtocol { } // expected-cascading-conformance {{main.PublicProtocol}}
|
|
extension PrivateConformance: InternalProtocol { } // expected-cascading-conformance {{main.InternalProtocol}}
|
|
extension PrivateConformance: FilePrivateProtocol { } // expected-cascading-conformance {{main.FilePrivateProtocol}}
|
|
extension PrivateConformance: PrivateProtocol { } // expected-cascading-conformance {{main.PrivateProtocol}}
|
|
|