[SR-1263] Compiler wrongfully complains of illegal syntax when declaring multiple conformances for a protocol's associated type. #43871
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
improvement
parser
Area → compiler: The legacy C++ parser
Environment
Xcode 7.3, Swift 2.2
Additional Detail from JIRA
md5: a77e8115a872254919c357ee734646ef
Issue Description:
The following code is legal:
{code:swift }
protocol A
{
}
protocol B
{
}
typealias C_AssociatedTypeA_Inheritance = protocol<A, B>
protocol C
{
associatedtype AssociatedTypeA: C_AssociatedTypeA_Inheritance
}
EDIT: I had assumed that this was just a bug, but according to the comments this is intended to be illegal. However, I feel that we should allow this syntax. I've corrected the 'Issue Type' to 'Improvement'.
The text was updated successfully, but these errors were encountered: