Files
swift-mirror/validation-test/compiler_crashers_2_fixed/rdar67259506.swift
Slava Pestov 876fe2f639 Sema: Redeclaration checking should not mark implicit decls as invalid
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>.
2020-08-18 23:45:52 -04:00

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
}
}