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-12086] No-escape blocks in function builder now require explicit self #54522
Comments
Works fine for me on |
@swift-ci create |
Comment by Zhu Shengqi (JIRA) The code still failed to compile with latest snapshot (January 24, 2020). I have provided the Xcode version and the snapshot version. Anyone want to fix the issue should try to reproduce it first, not just saying "works fine for me". |
Sorry, I did try it yesterday and it worked for me. See: ![](Screenshot 2020-01-26 at 02.25.25.png) Let me pull from master again and retry. |
Comment by Zhu Shengqi (JIRA) You are not using the same environment as I do. I use Xcode 11.3.1 (11C504) with development snapshot, while you are using terminal with swift git repo. |
I don’t think Xcode is going to make any difference given this is a Swift error, but I will verify with Xcode as well. There are two snapshots, a “trunk” snapshot and a 5.2 development snapshot. They are different, so could you confirm which one you’re using exactly? |
Comment by Zhu Shengqi (JIRA) I use snapshot under the "Trunk development (master)" category. |
Comment by Zhu Shengqi (JIRA) I just download the "Swift 5.2 development" snapshot and the code compiles with it. So either the code in "Trunk development (master)" introduce a new bug, or a fix is committed in "Swift 5.2 development" but not merged back to "Trunk development (master)" yet. Can someone verify which is the case? |
Comment by Zhu Shengqi (JIRA) And if master branch mentioned above corresponds to the "Trunk development (master)", then there may be some problem when the CI create the snapshots. |
Okay, I can reproduce it with the latest trunk snapshot and on the |
Looking into this a bit more - this PR added a call to |
This PR should fix the issue: #29649 |
@hborla, since PR was merged this should be resolved? |
@LucianoPAlmeida oops, yes, thank you! |
The issue has been fixed on master. Could you please verify using a recent master snapshot? Thank you! |
Attachment: Download
Environment
Xcode 11.3.1 (11C504) with development snapshot (January 23, 2020 Master branch)
Additional Detail from JIRA
md5: 67c15c002b60d7027d8fd173b38740a1
Issue Description:
In the latest development snapshot (January 23, 2020 Master branch), the code in the playground (see attachment) cannot compile. An error is emitted says "Reference to property 'iuoObj' in closure requires explicit use of 'self' to make capture semantics explicit". But the closure is non-escaping, so this code should be compiled with no error.
The text was updated successfully, but these errors were encountered: