Files
swift-mirror/test/SILGen/Inputs/witness_tables_multifile_2.swift
Doug Gregor 8bd093d36b Eliminate the "ambiguous implied conformance" error.
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
2015-07-13 21:56:40 +00:00

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() { }
}