Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0049-sr2611.swift
Slava Pestov 412559af79 Add test cases for a few bugs that seem to be fixed already
Cleaning out some old JIRAs, don't want these to regress...
2017-01-04 02:02:29 -08:00

19 lines
509 B
Swift

// RUN: %target-swift-frontend %s -emit-ir
protocol Foo {
associatedtype A
var value: A { get }
init(_ v: A)
}
extension Foo {
init<T>(pairing other: T)
where
T: Foo,
Self.A == (T.A, T.A) // <-- Look at this, and then at the error below.
{
let otherValuePaired = (other.value, other.value)
let v: A = otherValuePaired // <-- Error: Cannot convert value of
self.init(v) // type '(T.A, T.A)' to specified type 'Self.A'
}
}