[SR-2306] Should a noescape closure be a subtype of an escaping closure? #44913
Labels
compiler
The Swift compiler in itself
conformances
Feature → protocol: protocol conformances
duplicate
Resolution: Duplicates another issue
feature
A feature request or implementation
improvement
protocol
Feature → type declarations: Protocol declarations
type checker
Area → compiler: Semantic analysis
Environment
swift-DEVELOPMENT-SNAPSHOT-2016-08-04
Additional Detail from JIRA
md5: 7d9cc7cc1833db1813b64ec3c29ad96d
duplicates:
Issue Description:
If I define a protocol like this:
I cannot make a type conform which has a more restrictive noescape closure:
Seems like it should work. I initially got a bit confused, but noescape is not so much an attribute of the closure, it's more an effect of the method.
Seems like the code above should be possible. Not sure what the implications are.
The text was updated successfully, but these errors were encountered: