File tree 4 files changed +12
-2
lines changed
Inputs/clang-importer-sdk/swift-modules
4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6563,7 +6563,8 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
6563
6563
if (existingModule != dc->getParentModule () &&
6564
6564
(existingModule->getName () ==
6565
6565
extendedNominal->getParentModule ()->getName () ||
6566
- existingModule == diag.Protocol ->getParentModule ())) {
6566
+ existingModule == diag.Protocol ->getParentModule () ||
6567
+ existingModule->getName ().is (" CoreGraphics" ))) {
6567
6568
// Warn about the conformance.
6568
6569
auto diagID = differentlyConditional
6569
6570
? diag::redundant_conformance_adhoc_conditional
Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ func test() -> UnsafeMutablePointer<CGFloat>? {
17
17
return CGColorGetComponents ( color)
18
18
}
19
19
20
+ // Allow redundant conformances on CoreFoundation
21
+ // types where the conformance is in CoreGraphics.
22
+ extension CGFloat : CustomStringConvertible { }
Original file line number Diff line number Diff line change @@ -52,3 +52,9 @@ public extension Double {
52
52
}
53
53
}
54
54
#endif
55
+
56
+ import CoreFoundation
57
+
58
+ extension CGFloat : CustomStringConvertible {
59
+ public var description : String { " " }
60
+ }
Original file line number Diff line number Diff line change 10
10
// RUN: %target-swift-frontend -typecheck %s -parse-as-library -emit-objc-header-path %t/swift.h
11
11
// RUN: %FileCheck %s < %t/swift.h
12
12
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -DCGFLOAT_IN_COREFOUNDATION -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreFoundation.swift
13
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -DCGFLOAT_IN_COREFOUNDATION -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift
13
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t ) -DCGFLOAT_IN_COREFOUNDATION -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift
14
14
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
15
15
16
16
// REQUIRES: objc_interop
You can’t perform that action at this time.
0 commit comments