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

35 lines
569 B
Swift

// RUN: %target-swift-frontend %s -emit-silgen
protocol FooProtocol {
associatedtype Element
}
protocol Bar {
associatedtype Foo : FooProtocol
typealias Element = Foo.Element
mutating func extend<
C : FooProtocol
>(elements: C)
where
C.Element == Element
}
struct FooImpl<T> : FooProtocol {
typealias Element = T
}
struct BarImpl<T> : Bar {
typealias Foo = FooImpl<T>
// Uncomment this line to make it compile:
// typealias Element = T
mutating func extend<
C : FooProtocol
>(elements: C)
where
C.Element == T {}
}