Files
swift-mirror/test/ClangImporter/protocol-conformance-in-extension.swift
Saleem Abdulrasool 7606e2b5c5 ClangImporter: improve ObjC-interop and enable tests
This enables additional tests for the ClangImporter.  This found a
missing piece in the `-enable-objc-interop` work that was done
previously.  Address that and enable the tests.  There are now the
following failing tests on Linux:

  * sdk - depends on Foundation (not hermetic, see SR-7572)
  * mixed-nsuinteger - depends on Foundation (not hermetic, see SR-7572)
  * import-mixed-with-header-twice - requires apple/swift PR#16022
  * can_import_objc_idempotent - requires apple/swift PR#16022
  * objc_protocol_renaming - requires apple/swift PR#16022
2018-05-01 18:39:42 -07:00

20 lines
864 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -enable-objc-interop -emit-module -o %t/a~partial.swiftmodule -I %S/Inputs/custom-modules -module-name TEST -primary-file %s
// RUN: %target-swift-frontend -enable-objc-interop -emit-module -o %t/test.swiftmodule -I %S/Inputs/custom-modules -module-name TEST %t/a~partial.swiftmodule
import TestProtocols
// The protocol in the extension has to refine something that the base class
// conforms to to trigger the error in rdar://problem/32346184.
protocol SomeSwiftProto: Equatable {}
extension ProtocolTestingBase: Equatable {
public static func ==(left: ProtocolTestingBase, right: ProtocolTestingBase) -> Bool {
return left === right
}
}
// The extension going through the typealias also makes a difference.
typealias SpecialObject = SubProtoImpl
extension SpecialObject: SomeSwiftProto {
}