-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.overload resolutionArea → compiler → type checker: Overload resolution (ranking)Area → compiler → type checker: Overload resolution (ranking)regressiontype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Description
in Xcode 15 beta 6,RxSwiftExt Package is starting to fail building. It turns out that specific method declaration extension is problematic.
Steps to reproduce
I made a simple example to reproduce. or you can try to build RxSwiftExt Package.
import RxSwift
extension Observable {
func test() -> Observable<Bool> {
// error: Cannot convert return expression of type 'Observable<Element>' to return type 'Observable<Bool>'
// error: Cannot specialize non-generic type 'Observable<Element>'
return Observable<Bool>.empty()
}
}
but this two code is passing without error.
// fully unqualified
extension Observable {
func test() -> Observable<Bool> {
return .empty()
}
}
// fully qualified
extension Observable {
func test() -> Observable<Bool> {
return RxSwift.Observable<Bool>.empty()
}
}
Expected behavior
build success without error
Environment
- Swift compiler version info
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0
- Xcode version info
Xcode 15.0
Build version 15A5219j
- Deployment target: N/A
awBSH, ppiatkowski, patrvvvk, MontakOleg, ccsms12 and 6 moretreastrain, freak4pc and alexander-kurilovich-gismart
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.overload resolutionArea → compiler → type checker: Overload resolution (ranking)Area → compiler → type checker: Overload resolution (ranking)regressiontype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis