mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`SK_Fix` was used to indicate that solver has encountered a hole along the current path but since there is `SK_Hole` now, increasing `SK_Fix` no longer makes sense.
15 lines
481 B
Swift
15 lines
481 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
protocol P {
|
|
associatedtype A
|
|
}
|
|
|
|
func foo<T: P>(_: () throws -> T) -> T.A? { // expected-note {{where 'T' = 'Never'}}
|
|
fatalError()
|
|
}
|
|
|
|
let _ = foo() {fatalError()} & nil // expected-error {{global function 'foo' requires that 'Never' conform to 'P'}}
|
|
// expected-error@-1 {{value of optional type 'Never.A?' must be unwrapped to a value of type 'Never.A'}}
|
|
// expected-note@-2 {{force-unwrap}}
|
|
// expected-note@-3 {{coalesce using '??'}}
|