-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
associated type inferencebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselftype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Previous ID | SR-13172 |
Radar | rdar://problem/65248356 |
Original Reporter | @theblixguy |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Swift 5.3 / Xcode 12 beta
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, AssociatedTypeInference, TypeChecker |
Assignee | @theblixguy |
Priority | Medium |
md5: 8aef054423df4c6f72d750bca9e0940c
Issue Description:
Associated type inference does not seem to work correctly when using an enum case as a protocol witness:
protocol FooType {
associatedtype Bar
static func bar(_ value: Bar) -> Self
}
enum Foo: FooType { // Type 'Foo' does not conform to protocol 'FooType'
case bar(String)
}
Metadata
Metadata
Assignees
Labels
associated type inferencebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselftype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis