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-4013] [Swift 3.1] Can't inline function if it calls a private helper #46598

Closed
swift-ci opened this issue Feb 21, 2017 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-4013
Radar None
Original Reporter diegosanchezr (JIRA User)
Type Bug
Status Resolved
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.1Regression
Assignee None
Priority Medium

md5: b74de177310f13fddb0711dfadd7be85

Issue Description:

This code used to compile in Swift 3.0

@inline(__always)
public func foo() {
    bar()
}

@inline(__always)
private func bar() {
}

Now it complains with

"global function 'bar()' is private and cannot be referenced from an '@inline(__always)' function"
@belkadan
Copy link
Contributor

@inline(__always) is not a publicly-supported feature (as evidenced by the underscores). Changes in its behavior should be expected until if and when it goes through the Swift Evolution Process.

@swift-ci
Copy link
Collaborator Author

Comment by Diego (JIRA)

🙁

@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
Projects
None yet
Development

No branches or pull requests

2 participants