mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
There are cases when adding missing conformance fix doesn't really make sense like in case of `Void` and `Never` types because that wouldn't result in a useful diagnostic. This is a follow-up for rdar://problem/44770297
12 lines
285 B
Swift
12 lines
285 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
protocol P {
|
|
associatedtype A
|
|
}
|
|
|
|
func foo<T: P>(_: () throws -> T) -> T.A? { // expected-note {{in call to function 'foo'}}
|
|
fatalError()
|
|
}
|
|
|
|
let _ = foo() {fatalError()} & nil // expected-error {{generic parameter 'T' could not be inferred}}
|