[SR-13842] Compiler fails to type check optional UIImage when SwiftUI
is imported
#56240
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
BigSur 11.0.1
Xcode 12.2 beta 4
Additional Detail from JIRA
md5: dfabfdcb3a7fd0eae9dbab6e92195d38
duplicates:
Issue Description:
Here's a minimum reproducible:
The expectation here is that the compiler should be able to resolve .background to an optional UIImage, and accept it as the argument to initialize via UIIImageView(image: ).
However, when SwiftUI is imported in this context, the type checker fails with the following error message
The output of running
The text was updated successfully, but these errors were encountered: