issue: Initialiser does not override a designated initialiser from its superclass On Xcode 14.3 (arm64)
abhuzz opened this issue · comments
Short description of the issue:
When I tried to run the project at that time these errors occur:
Expected outcome: This supportive RxCocoa should run smoothly without error on arm64.
What actually happens:
https://github.com/abhuzz/RxCocoa_issue/raw/bf5dddb7ba3e209d80ea133d91e68fbe5ebe90e7/error_occurs.mov
Self contained code example that reproduces the issue:
// RxTableViewReactiveArrayDataSource.swift
class RxTableViewReactiveArrayDataSourceSequenceWrapper<S: Sequence>
: RxTableViewReactiveArrayDataSource<S.Iterator.Element>
, RxTableViewDataSourceType {
typealias Element = S
override init(cellFactory: @escaping CellFactory) { // Initializer does not override a designated initializer from its superclass
super.init(cellFactory: cellFactory)
}
func tableView(_ tableView: UITableView, observedEvent: Event<S>) {
Binder(self) { tableViewDataSource, sectionModels in
let sections = Array(sectionModels)
tableViewDataSource.tableView(tableView, observedElements: sections)
}.on(observedEvent)
}
}
// RxCollectionViewReactiveArrayDataSource.swift
class RxCollectionViewReactiveArrayDataSourceSequenceWrapper<S: Sequence>
: RxCollectionViewReactiveArrayDataSource<S.Iterator.Element>
, RxCollectionViewDataSourceType {
typealias Element = S
override init(cellFactory: @escaping CellFactory) { // Initializer does not override a designated initializer from its superclass
super.init(cellFactory: cellFactory)
}
func collectionView(_ collectionView: UICollectionView, observedEvent: Event<S>) {
Binder(self) { collectionViewDataSource, sectionModels in
let sections = Array(sectionModels)
collectionViewDataSource.collectionView(collectionView, observedElements: sections)
}.on(observedEvent)
}
}
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
RxSwift (>= 4.4.2, ~> 4.4) and RxCocoa (4.5.0)
Platform/Environment
- iOS 16.2 (arm64)
- macOS
- tvOS
- watchOS
- playgrounds
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
- easy, 100% repro
- sometimes, 10%-100%
- hard, 2% - 10%
- extremely hard, %0 - 2%
Xcode version:
Xcode Version 14.3
Installation method:
- CocoaPods
- Carthage
- Git submodules
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
- yes (which ones)
- no (only one 14.3)
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
- just starting
- I have a small code base
- I have a significant code base
Same issue with me. Any solution?
Same issue with me.
Oh I reproduced the same error, I think this only happens on older versions(RxCocoa 4.5.0).
Updating to the latest version does not cause the error.
If you want to keep the old version and get rid of the error, you can remove the initializer like I did with the PR I opened.