Skip to content

Commit cd73061

Browse files
authored
[pigeon] Fully-qualify types in Equatable extension test (flutter#6946)
Updating to Xcode 16 exposed a new compilation error: "extension declares a conformance of imported type 'DataWithEnum' to imported protocol 'Equatable'". The [Swift Warning for Retroactive Conformances of External Types](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0364-retroactive-conformance-warning.md) proposal says: > It does mean projects building with an older Swift will not have access to [the @retroactive] syntax, so as a source compatible fallback, a client can silence this warning by fully-qualifying all types in the extension. As an example, the above conformance can also be written as > ``` > extension Foundation.Date: Swift.Identifiable { > // ... > } > ``` > This will allow projects that need to build with multiple versions of Swift, and which have valid reason to declare such conformances, to declare them without tying their project to a newer compiler build. So change the test to fully-qualify the types. This prevented the warning when I tried it in flutter/packages#6942. Fixes flutter#150391
1 parent 937038c commit cd73061

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/pigeon/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* [swift] Fully-qualifies types in Equatable extension test.
4+
15
## 20.0.1
26

37
* [cpp] Fixes handling of null class arguments.

packages/pigeon/platform_tests/test_plugin/example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import Flutter
66
import UIKit
77

8-
@UIApplicationMain
8+
@main
99
@objc class AppDelegate: FlutterAppDelegate {
1010
override func application(
1111
_ application: UIApplication,

packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/EnumTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MockEnumApi2Host: EnumApi2Host {
1212
}
1313
}
1414

15-
extension DataWithEnum: Equatable {
15+
extension test_plugin.DataWithEnum: Swift.Equatable {
1616
public static func == (lhs: DataWithEnum, rhs: DataWithEnum) -> Bool {
1717
lhs.state == rhs.state
1818
}

0 commit comments

Comments
 (0)