Compiler warnings for opaque return types do not explain the problem fully, making it hard to understand #80226
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
I'm trying to write code that should return a sequence of values, based upon a condition. The return types are the same. The funnel function cannot return one of the two separate functions conditionally without a compiler error.
Reproduction
Expected behavior
I expect this to be able to compile, but it's quite likely I'm not understanding something correctly.
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
Additional information
I know the functions typeA and typeB are similar, but in my real world case, their implementations are quite different. So generalizing those would not really apply for me. This example is just the first simplified version of the problem I was able to get to. Thanks.
The text was updated successfully, but these errors were encountered: