[SR-4625] Compiler reports an error for protocol conformance for method with default parameter value #47202
Labels
compiler
The Swift compiler in itself
conformances
Feature → protocol: protocol conformances
default arguments
Feature: default arguments for value parameters
feature
A feature request or implementation
protocol
Feature → type declarations: Protocol declarations
swift evolution proposal needed
Flag → feature: A feature that warrants a Swift evolution proposal
Additional Detail from JIRA
md5: 9f3652ed2c3781923f5eef96e067f81b
Issue Description:
For example in a code like this:
Compiler reports an error, that there's no implementation for func someFunction() in SomeClass. For example I got such report in playground:
but it's possible to execute following code:
So I believe this class could be treated as conforming to the SomeProtocol protocol.
The workaround is easy but requires boilerplate code. It would be great if compiler would take default argument values into account while checking protocol conformance.
The text was updated successfully, but these errors were encountered: