mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Instead of requiring the user to disambiguate where an implied protocol conformance goes---which they really, really don't care about---just pick an arbitrary-but-deterministic location for the conformance, which corresponds to the file unit in which the witness table will be emitted. Fixes rdar://problem/21538899. Swift SVN r30168
20 lines
833 B
Swift
20 lines
833 B
Swift
protocol Fooable {
|
|
func foo()
|
|
}
|
|
|
|
protocol InheritsFooable2 : Fooable {}
|
|
|
|
// CHECK-SECOND-FILE-NOT: sil_witness_table hidden FooStruct: InheritsFooable module witness_tables_multifile
|
|
// CHECK-SECOND-FILE-DAG: sil_witness_table hidden FooStruct: Fooable module witness_tables_multifile
|
|
// CHECK-SECOND-FILE-NOT: sil_witness_table hidden FooStruct: InheritsFooable module witness_tables_multifile
|
|
extension FooStruct : Fooable {
|
|
func foo() { }
|
|
}
|
|
|
|
// CHECK-SECOND-FILE-NOT: sil_witness_table hidden FooStruct2: InheritsFooable module witness_tables_multifile
|
|
// CHECK-SECOND-FILE-NOT: sil_witness_table hidden FooStruct2: Fooable module witness_tables_multifile
|
|
// CHECK-SECOND-FILE-DAG: sil_witness_table hidden FooStruct2: InheritsFooable2 module witness_tables_multifile
|
|
extension FooStruct2 : InheritsFooable2 {
|
|
func foo() { }
|
|
}
|