You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[pigeon] Fix Object arguments in Swift and C++ (#3020)
Fixes a warning in generated Swift output when an argument is of type Object. This is blocking flutter/plugins#6914 since we check our macOS and iOS plugin code for warnings in CI.
Rather than add a Dart generator unit test for this one specific case, I tightened the Swift compilation settings for our test plugin to treat warnings as errors (per flutter/flutter#59116 (comment)) to catch the entire class of errors, and added echo* variants for Object to make sure this one then showed up.
Incidental fixes:
I had to make a similar fix to the Dart generator for a similar warning with casting to Object?, which we'd never noticed because we weren't analyzing any generated code that returning Object or Object? before.
I had to make a change to the C++ generator so that generation would succeed, because it turned out we had no handling at all of Object in the C++ generator, causing it to throw. I'm not sure this is the output I'll keep for C++ (thus the TODO), but it's the simple fix to make it work at all.
Fixesflutter/flutter#117994
Part of flutter/flutter#59116
Copy file name to clipboardExpand all lines: packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/AlternateLanguageTestPlugin.java
+10
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,11 @@ public byte[] echoUint8List(@NonNull byte[] aUint8List) {
Copy file name to clipboardExpand all lines: packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
+65-10
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
//
5
-
// Autogenerated from Pigeon (v4.2.15), do not edit directly.
5
+
// Autogenerated from Pigeon (v4.2.16), do not edit directly.
0 commit comments