Repository navigation
Closed
flutter/packages
#13299Labels
p: image_pickerThe Image Picker plugin.The Image Picker plugin.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform team
Description
Testing failed:
Conditional downcast from '[String]?' to '[String]' does nothing
Conditional downcast from '[String]?' to '[String]' does nothing
Conditional downcast from '[String]?' to '[String]' does nothing
Conditional downcast from '[String]?' to '[String]' does nothing
Comparing non-optional value of type 'UIViewController' to 'nil' always returns true
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:536:24: error: conditional downcast from '[String]?' to '[String]' does nothing
#expect(result as? [String] == [])
~~~~~~~^~~~~~~~~~~~
@__swiftmacro_11RunnerTests0033ImagePickerPluginTestsswift_DbGHjfMX535_8_33_30E27F9AB39617F94411F8AEA4811548Ll6expectfMf_.swift:1:39: error: conditional downcast from '[String]?' to '[String]' does nothing
Testing.__checkBinaryOperation(result as? [String],{ $0 == $1() },[],expression: .__fromBinaryOperation(.__fromSyntaxNode("result as? [String]"),"==",.__fromSyntaxNode("[]")),comments: [],isRequired: false,sourceLocation: Testing.SourceLocation.__here()).__expected()
~~~~~~ ^ ~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:536:9: note: in expansion of macro 'expect' here
#expect(result as? [String] == [])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:536:9: note: in expansion of macro 'expect' here
#expect(result as? [String] == [])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:552:24: error: conditional downcast from '[String]?' to '[String]' does nothing
#expect(result as? [String] == [])
~~~~~~~^~~~~~~~~~~~
@__swiftmacro_11RunnerTests0033ImagePickerPluginTestsswift_DbGHjfMX551_8_33_30E27F9AB39617F94411F8AEA4811548Ll6expectfMf_.swift:1:39: error: conditional downcast from '[String]?' to '[String]' does nothing
Testing.__checkBinaryOperation(result as? [String],{ $0 == $1() },[],expression: .__fromBinaryOperation(.__fromSyntaxNode("result as? [String]"),"==",.__fromSyntaxNode("[]")),comments: [],isRequired: false,sourceLocation: Testing.SourceLocation.__here()).__expected()
~~~~~~ ^ ~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:552:9: note: in expansion of macro 'expect' here
#expect(result as? [String] == [])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:552:9: note: in expansion of macro 'expect' here
#expect(result as? [String] == [])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.swift:763:72: error: comparing non-optional value of type 'UIViewController' to 'nil' always returns true
#expect(plugin.presentingViewControllerForImagePickerInNewWindow() != nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
Note this isn't currently being caught in CI due to #194517
Metadata
Metadata
Assignees
Labels
p: image_pickerThe Image Picker plugin.The Image Picker plugin.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform team
Activity
[-]image_picker_ios has really minor "Conditional downcast" and "Comparing non-optional value to nil" warnings[/-][+]image_picker_ios has "Conditional downcast" and "Comparing non-optional value to nil" Swift warnings[/+][image_picker_ios] Fix Swift warnings in ImagePickerPluginTests (flut…
github-actions commentedon Oct 31, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.