mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- Pass down the TypeResolution instance so we can get the generic signature. This ensures we always use the correct signature in SIL mode. - Don't diagnose if the type contains error types.
17 lines
475 B
Swift
17 lines
475 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
public struct Wrapped<Values>: Sequence where Values: Sequence {
|
|
public var values: Values
|
|
|
|
public func makeIterator() -> Values.Iterator {
|
|
values.makeIterator()
|
|
}
|
|
}
|
|
|
|
// expected-error@+1 {{reference to generic type 'Array' requires arguments in <...>}}
|
|
extension Wrapped where Values == Array {
|
|
public init(repeating value: Element, count: Int) {
|
|
values = Array(repeating: value, count: count)
|
|
}
|
|
}
|