Files
swift-mirror/validation-test/compiler_crashers_fixed/0158-rdar40165062.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

16 lines
488 B
Swift

// RUN: %target-typecheck-verify-swift
struct Foo<T, U> { // expected-note {{incorrect labels for candidate (have: '(_:)', expected: '(value:)')}}
var value: U
func bar() -> Foo<T, U> {
return Foo(value)
// expected-error@-1 {{no exact matches in call to initializer}}
}
}
extension Foo where T == U { // expected-note {{candidate requires that the types 'T' and 'U' be equivalent (requirement specified as 'T' == 'U')}}
init(_ value: U) {
self.value = value
}
}