mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Because binding producer is going to attempt to unwrap optionals and try the type, which would lead to infinite recursion because dependent member types aren't bindable. Resolves: rdar://problem/44770297
12 lines
180 B
Swift
12 lines
180 B
Swift
// RUN: not %target-swift-frontend -typecheck %s
|
|
|
|
protocol P {
|
|
associatedtype A
|
|
}
|
|
|
|
func foo<T: P>(_: () throws -> T) -> T.A? {
|
|
fatalError()
|
|
}
|
|
|
|
_ = foo() { fatalError() } & nil
|