mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- Don't pass 'verify' since it's now the default - Update tests where diagnostics changed in a correct way to pass 'on' instead - Delete compiler_scale/explicit_requirements_perf.swift since it's not testing anything with the requirement machine
11 lines
302 B
Swift
11 lines
302 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
enum Term<S> where S: Sequence, S.Iterator.Element == Term {
|
|
// expected-error@-1 *{{generic enum 'Term' has self-referential generic requirements}}
|
|
case Cons(head: String, tail: S)
|
|
}
|
|
|
|
func produce<S>(s: S) -> Term<S> {
|
|
return .Cons(head: "hi", tail: s)
|
|
}
|