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
[SR-11590] Swift 5.1 Xcode 11.0: A segmentation fault when compiling a faulty program with #imageLiteral()
#53995
Comments
Here's a smaller reproducer: import UIKit
class Bar {
var image: UIImage?
func foo() {
self.image = #imageLiteral()
}
}
This was with a Swift 5.1 toolchain, however on master this does not crash and I get an error:
|
It looks like it has been fixed by #27063 because it used to crash in CSApply and now it produces an error instead. |
Hey @xedin 🙂 There is a slight variant of this that causes a bad diagnostic ![](Screen Shot 2020-06-20 at 19.53.51.png) Should we open a new issue with this to improve the diagnostics? Edit: 2020-06-17 master snapshot |
Attachment: Download
Environment
macOS Catalina 11.15.0
Swift 5.1
Xcode 11.0
MacBook Pro Early 2015
Additional Detail from JIRA
md5: cecd57bf7e448e9960af83bb80f07a5d
Issue Description:
I tried it on a Swift Playground (environment stated), when I tried to compile something with
#imageLiteral()
It just stated an error (which is correct), and it didn't make a problem, but compiling it when inside a closure, like:
A segmentation fault that stops the compiler happens
I couldn't extract any detailed problem, so I tried to make it in an Xcode project and replaced the main ViewController code with the code I tried, then I got this message
The text was updated successfully, but these errors were encountered: