Files
swift-mirror/validation-test/compiler_crashers_2_fixed/issue-61031.swift
Slava Pestov 2f4ed5a949 Sema: Clean up diagnoseMissingOwnership()
- 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.
2024-02-29 18:13:28 -05:00

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)
}
}