swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.3k stars 10.33k forks source link

6.0 conformance regression with abstract type witness #75504

Open AnthonyLatsis opened 1 month ago

AnthonyLatsis commented 1 month ago

Description

No response

Reproduction

protocol P {
  associatedtype A
}

protocol Q: P where A == Void {}

struct S {}
extension S: Q {}
extension S: P {}

Expected behavior

Successful compilation

Environment

Swift version 6.0-dev (LLVM c7c87ee42989d4b, Swift 8493312b06605f1) Target: x86_64-apple-macosx14.0

Additional information

No response

AnthonyLatsis commented 1 month ago

@slavapestov Did the old code where we looked at other conformances regardless of the context cause issues?

https://github.com/swiftlang/swift/blob/eb675c222eed840c911d77a614d6d4e5bc350d12/lib/Sema/AssociatedTypeInference.cpp#L2363-L2371