-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[pigeon] Minor fixes to NNBD type handling in Dart #1543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
473538e
9ecf6bc
da250fe
4713a48
dbd4f67
e1177f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,23 @@ abstract class NullableArgHostApi { | |
| abstract class NullableArgFlutterApi { | ||
| int doit(int? x); | ||
| } | ||
|
|
||
| @HostApi() | ||
| abstract class NonNullCollectionHostApi { | ||
| List<String?>? doit(); | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this here is making sure that the generated code compiles and the dart unit tests below make sure it is generating code as you expect it. But we aren't executing the generated code in the platform tests. Did you want to take a stab at that? That could be added here: https://github.com/flutter/packages/blob/master/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added tests. I noticed that there were also no platform tests of the existing non-collection null return handling, so I added that too. This spawned a few other changes:
I'm now including the updated generated files, since otherwise the mocks and mock annotations that are now in this PR would refer to things that weren't in the versions of the files checked into the tree, which would be really weird. |
||
|
|
||
| @FlutterApi() | ||
| abstract class NonNullCollectionFlutterApi { | ||
| List<String?>? doit(); | ||
| } | ||
|
|
||
| @HostApi() | ||
| abstract class NullableCollectionArgHostApi { | ||
| List<String?> doit(List<String?>? x); | ||
| } | ||
|
|
||
| @FlutterApi() | ||
| abstract class NullableCollectionArgFlutterApi { | ||
| List<String?> doit(List<String?>? x); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.