mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If both the 'other' and 'current' declarations are implicit, we don't emit a diagnostic unless they are both derived from property wrappers or lazy property storage. However, we would still call setInvalid() unconditionally, which splats an ErrorType into the interface type, which would crash in the AST verifier if no other diagnostic was emitted. Fixes <rdar://problem/67259506>.
30 lines
394 B
Swift
30 lines
394 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
public func foo<T : P & Q>(_: T, _: S<T>.A) {}
|
|
|
|
public protocol P {
|
|
associatedtype A
|
|
|
|
func foo() -> A
|
|
}
|
|
|
|
public protocol Q {
|
|
associatedtype A
|
|
|
|
func bar() -> A
|
|
}
|
|
|
|
public struct S<T> {}
|
|
|
|
extension S : P where T : P {
|
|
public func foo() -> Int {
|
|
return 0
|
|
}
|
|
}
|
|
|
|
extension S : Q where T : Q {
|
|
public func bar() -> Int {
|
|
return 0
|
|
}
|
|
}
|