[SR-8318] Optional generic return type not treated as specialised #50846
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: d13cadc615b655a51990e1aa197ad547
Issue Description:
Two generic functions that differ in that the return values are optional vs non-optional cause an ambiguity error when the type will resolve as an optional.
Example:
The optional return type should be used, just as it would be with a function parameter, as it is more specialised.
The text was updated successfully, but these errors were encountered: