Swift will not infer opaque return type of generic function #73449
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
No response
Reproduction
NG Pattern
When using an opaque type as the return-value, the compiler says "Type 'Impl' does not conform to protocol 'X'".
OK Pattern
When using a concrete type as the return-value, the compiler is silent.
Expected behavior
Impl
conformX
even when it returnssome View
, and the compiler says nothing.Environment
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Additional information
Xcode 15.3 (15E204a)
macOS 14.4.1(23E224)
swift-forum discussion: https://forums.swift.org/t/swift-will-not-infer-opaque-return-type-of-generic-function/67233
The text was updated successfully, but these errors were encountered: