matrix-org / matrix-org/matrix-ios-sdk
[Bug] "ambiguous use of" error for functions
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 484
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Was trying to run the swift examples from the README and I keep getting the following error
error: MatrixSDK.playground:10:1: error: ambiguous use of 'start(withSyncFilterId:completion:)'
session.start { response in
^
MatrixSDK.MXSession:2:26: note: found this candidate
@nonobjc public func start(withSyncFilterId filterId: String? = nil, completion: @escaping (MatrixSDK.MXResponse<Void>) -> Void)
^
/Users/focks/Documents/Xcode Projects/Pill/Pods/MatrixSDK/MatrixSDK/Contrib/Swift/MXSession.swift:34:19: note: found this candidate
@nonobjc func start(withSyncFilterId filterId: String? = nil, completion: @escaping (_ response: MXResponse<Void>) -> Void) {
^
To Reproduce
Steps to reproduce the behavior:
- Follow swift CocoaPods install instructions
- try running the code for Example 2 where you fetch rooms a user has been in
- See error
Expected behavior
the code to work and fetch the list of rooms
Desktop (please complete the following information):
- OS: macOS
- Version: 11.3
- Swift Version: 5.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the ambiguity by following the Swift CocoaPods instructions and running README Example 2. Start with Contrib/Swift/MXSession.swift and compare the two start(withSyncFilterId:completion:) candidates shown by the compiler. Done means the example compiles and fetches the user's rooms without the ambiguous-use error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100