Commit 6bd59cd
authored
[pigeon][reland]enable treat warnings as errors for swift code in unit test (#3901)
`as [Any?]` here is actually not a "cast", but a "type annotation". An equivalent fix can be:
```
let arg: [Any?] = [nil]
let inputEncoded = binaryMessenger.codec.encode(arg)
```
Fixes
```
heterogeneous collection literal could only be inferred to '[Any?]'; add explicit type annotation if this is intentional
```
Which was introduced in #3889 and later got reverted.
See flutter/flutter#126006 for more details about some interesting research on this warning.
*List which issues are fixed by this PR. You must list at least one issue.*
Fixes flutter/flutter#126006
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*1 parent d9f7041 commit 6bd59cd
File tree
2 files changed
+4
-1
lines changed- packages/pigeon/platform_tests/test_plugin/example/ios
- Runner.xcodeproj
- RunnerTests
2 files changed
+4
-1
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
| |||
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| 561 | + | |
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
| |||
572 | 574 | | |
573 | 575 | | |
574 | 576 | | |
| 577 | + | |
575 | 578 | | |
576 | 579 | | |
577 | 580 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments