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-7430] Segmentation fault: 11 while compiling a function #49973
Comments
Indeed it would be great to at least get some more information about what is `CORETextFieldViewModel`, `textField`, signature of `addAction` and base of `.editingDidEndOnExit`, otherwise unfortunately this is not very actionable... |
Comment by Antoine Lamy (JIRA) I'm pretty sure |
antoinelamy (JIRA User) If you could extract it, that would be great! |
Comment by Antoine Lamy (JIRA) There you go! Just uncomment the mentioned line in |
Comment by Antoine Lamy (JIRA) Were you able to reproduce using the provided project? |
Sorry antoinelamy (JIRA User), I got side-tracked by other issues, but this is in my queue. |
@swift-ci create |
antoinelamy (JIRA User) Could you please try with beta 1 build of Xcode 10? Looks like this problem got fixed along the way. |
Comment by Antoine Lamy (JIRA) @xedin I tested it on Xcode 10 beta 1 on High Sierra and the issue is still present. Did you comment the specified line in the code sample to reproduce? |
antoinelamy (JIRA User) Your previous comment said that I should uncomment that line 🙂 Sorry, I does indeed still crash if that line is commented... |
Looks like this no longer crashes on master but produces "ambiguous expression" error instead, trying to figure out what I need to cherry-pick to 4.2 to fix it there too. |
The issue with captures has been fixed in main - all of the captures are going to be type-checked together with enclosing expression(s) now. Attached project type-checks correctly with and without `viewModel.returnKeyTapped()`. antoinelamy (JIRA User) Please verify using the latest main branch snapshot from swift.org. |
Attachment: Download
Environment
Xcode version 9.3 (9E145)
Swift 4.1
Additional Detail from JIRA
md5: 960a61165aea26c1feb87769bf17ba15
Issue Description:
The compiler gives me the following error while trying to compile a function:
The function written this way produce no error:
Erasing a line produce the error:
The text was updated successfully, but these errors were encountered: