Files
swift-mirror/test/Constraints/rdar44770297.swift
Pavel Yaskevich c25515b6a8 [CSDiagnostics] Don't try to fix conformances for Void and Never
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
2018-09-26 11:39:00 -07:00

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