Skip to content

[SR-13172] Associated type inference broken when using enum case as witness #55614

@theblixguy

Description

@theblixguy
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.compilerThe Swift compiler itselftype checkerArea → compiler: Semantic analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions