[SR-38] "protocol can only be used as a generic constraint" errors reported twice #42661
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift e8a15c6)
Target: x86_64-apple-macosx10.9
Compiled with the default build-script settings
Additional Detail from JIRA
md5: d13102ac8bfee811237d0ecbc6545377
Issue Description:
The code snippet from SR-8 illustrates a curious bug:
In Swift 2.1 (swiftlang-700.1.101.6), this correctly emits two errors:
Current tip of master emits each error twice, once for the protocol type, and then again for the variable:
The text was updated successfully, but these errors were encountered: