Files
swift-mirror/validation-test/compiler_crashers_fixed/0196-rdar48937223.swift
Hamish Knight 4e811c3a88 [test] Merge crasher directories
There is no longer much of a good reason to keep these separate,
merge them.
2025-10-18 12:51:30 +01:00

13 lines
456 B
Swift

// RUN: %target-typecheck-verify-swift
protocol P {}
func fn<T, U: P>(_ arg1: T, arg2: (T) -> U) {}
// expected-note@-1 {{required by global function 'fn(_:arg2:)' where 'U' = '()'}}
func test(str: String) {
fn(str) { arg in // expected-error {{type '()' cannot conform to 'P'}} expected-note {{only concrete types such as structs, enums and classes can conform to protocols}}
<#FOO#> // expected-error {{editor placeholder in source file}}
}
}