Skip to content
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-11614] Possible regression of the @_functionBuilder type-checker between Xcode 11.1 and Xcode 11.3.1 #54022

Closed
layoutSubviews opened this issue Oct 15, 2019 · 13 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself result builders Feature: Result builders type checker Area → compiler: Semantic analysis

Comments

@layoutSubviews
Copy link

Previous ID SR-11614
Radar None
Original Reporter @layoutSubviews
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 11.3.1 (11C504)

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, FunctionBuilder, TypeChecker
Assignee None
Priority Medium

md5: 407d392835fdd916ef2ef9c1575329ae

Issue Description:

See the attached playground: this (fairly straightforward) function builder builds & functions fine with Xcode 11.1's toolchain, but fails to build as of Xcode 11.3.1.

As far as I can tell there is nothing wrong with the code – simply `.collect` method at line 43 throws the compiler into a ditch.

@theblixguy
Copy link
Collaborator

Works fine on master. I don't have Xcode 11.2 so cannot test it to see what the error is.

@layoutSubviews
Copy link
Author

The error: `Cannot invoke 'collect' with an argument list of type '(@escaping () -> ())'`.

@belkadan
Copy link
Contributor

@rjmccall?

@rjmccall
Copy link
Member

No idea. @DougGregor, any possibility this is from your changes?

@DougGregor
Copy link
Member

It's very likely from my changes, and while we've fixed it on master... I don't know immediately what changed it.

@layoutSubviews
Copy link
Author

FYI, this is not fixed in Xcode 11.2.1.

@DougGregor
Copy link
Member

This regression has been fixed on master; there wasn't anything isolated enough to pull back to the 5.1 branch.

@swift-ci
Copy link
Collaborator

Comment by Mikhail Isaev (JIRA)

This playground compiles fine in Xcode 11.1 (11A1027), but won't compile in Xcode 11.3.1 (11C504)

@DougGregor
Copy link
Member

Please test against a Swift 5.2 snapshot from Swift.org. The fix is not in Xcode 11.3.1

@swift-ci
Copy link
Collaborator

Comment by Mikhail Isaev (JIRA)

@DougGregor Yaaaay![]( It is finally fixed in Swift 5.2 snapshot) Love you man![]( Thank you so much) I'm so happy!!!!!!

@DougGregor
Copy link
Member

Excellent

@swift-ci
Copy link
Collaborator

Comment by Gurami Jobava (JIRA)

@doug Gregor Is this fix included in Xcode 11.4 beta 2? Because it seems it’s not...

@swift-ci
Copy link
Collaborator

Comment by Mikhail Isaev (JIRA)

gjobava (JIRA User) could you check your swift version by calling `swift --version`? is it 5.2?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself result builders Feature: Result builders type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

6 participants