Skip to content

[SR-15956] [cxx-interop] Swift's type checking doesn't know how to deal with calling functions bound to inline namespace enum #58217

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

Open
hyp opened this issue Mar 9, 2022 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++

Comments

@hyp
Copy link
Contributor

hyp commented Mar 9, 2022

Previous ID SR-15956
Radar None
Original Reporter @hyp
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, CxxInterop
Assignee None
Priority Medium

md5: 3aa3cef7c3ca75618957485c6518bced

Issue Description:

There’s an issue with the Swift’s type checker when invoking functions from the inline namespace.

E.g.
```
namespace X {
inline namespace Y {
void test();

struct other {};
}
}
```

```
import X

extension X.other {
var s: String { return “” }
}

func test() {
X.test() // error here.
}

func test2(_ x: X.other) {
let s = x.s // error here.
}
```

See: https://github.com/apple/swift/blob/main/test/Interop/Cxx/namespace/inline-namespace-function-call-broken.swift

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@zoecarver zoecarver added c++ interop Feature: Interoperability with C++ and removed CxxInterop labels Apr 25, 2022
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. c++ interop Feature: Interoperability with C++
Projects
None yet
Development

No branches or pull requests

2 participants