File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Inputs/clang-importer-sdk/swift-modules Expand file tree Collapse file tree 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) {
65636563 if (existingModule != dc->getParentModule () &&
65646564 (existingModule->getName () ==
65656565 extendedNominal->getParentModule ()->getName () ||
6566- existingModule == diag.Protocol ->getParentModule ())) {
6566+ existingModule == diag.Protocol ->getParentModule () ||
6567+ existingModule->getName ().is (" CoreGraphics" ))) {
65676568 // Warn about the conformance.
65686569 auto diagID = differentlyConditional
65696570 ? diag::redundant_conformance_adhoc_conditional
Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ func test() -> UnsafeMutablePointer<CGFloat>? {
1717 return CGColorGetComponents ( color)
1818}
1919
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 {
5252 }
5353}
5454#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 1010// RUN: %target-swift-frontend -typecheck %s -parse-as-library -emit-objc-header-path %t/swift.h
1111// RUN: %FileCheck %s < %t/swift.h
1212// 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
1414// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
1515
1616// REQUIRES: objc_interop
You can’t perform that action at this time.
0 commit comments