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-9049] Swift syntax with undesirable behavior make Xcode sometime crash. #4621
Comments
This line
doesn't do what you think: it's saying "convert (3, 1) to (x: 3, y: 1), then unpack that into two variables named 'Int' and 'Double'". We have other bugs about warning when that happens, but whether or not it's desired behavior it shouldn't result in a crash. @swift-ci create |
Comment by Fred Riss (JIRA) About the crash: It looks like you're using the Playground in "Automatically run" mode. Can you confirm whether the crash happens when using "Manually Run" mode too? You can change this with a long press on the run triangle at the bottom of the playground |
Comment by Nhat Le Tien (JIRA) friss (JIRA User): Cannot reproduce crash with `Manually Run` mode. I just get the result like the picture bellow: |
nhatlee89 (JIRA User) as Jordan explained the compiler behavior is correct. However you've found an lldb bug. I can reproduce a crash here but it has a different backtrace than what you were seeing:
Can you double-check that you attached the right crash logs? |
Comment by Fred Riss (JIRA) Slava, this is a known issue, and the reason why I asked if it happens in Manual mode. Do you get this while running the Playground in Manual mode? |
No, I am not able to reproduce it in Manual mode. |
Comment by Nhat Le Tien (JIRA) @slavapestov: I had tried to attached the crash logs in the date I got this crash, so I think those must content the right log for this crash. But don't know if those had the same root cause, because I also used Xcode projects in that date too, not just playground. |
Attachment: Download
Additional Detail from JIRA
md5: ec567cfc707ab584a6c6fb9ee5e752c0
Issue Description:
As discussion on [forums|https://forums.swift.org/t/swift-4-2-strange-behavior/17177/6.] I use Playground with Xcode 10 on MacOS 10.14. The below code make Xcode sometime crash:
And sometime fail with suggestion report the crash like the image:
![](Screen Shot 2018-10-20 at 1.06.19 PM.png)
I attached the crash logs which have prefix `lldb-rpc-serve`:
lldb-rpc-server_2018-09-26-103226_Nhats-MacBook-Pro.crash
After I change the code to:
The result is 4. But I expected it fail to compile.
The text was updated successfully, but these errors were encountered: