[SR-11508] Generic Type inference breaks when generic object gets passed into closure #53909
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
Attachment: Download
Environment
macOS Mojave 10.14.6
XCode 12.1
Additional Detail from JIRA
md5: b9acd932aa1c486b7bf0ac1038700e73
Issue Description:
If I have a generic object (lets call it Builder) with a generic method with type constraints that I pass another generic object (lets call it Transformer) into the compiler seems to be able to figure out the type that Transformer should be if it is at all possible. However if instead of using the Builder object directly I create a closure that takes Builder the same exact code shows a compiler error saying the generic types are not matching. See attached file for more details.
The text was updated successfully, but these errors were encountered: