Files
swift-mirror/test/Generics/superclass_constraint_self_derived.swift
Slava Pestov b4b873332f Update -requirement-machine-* flags in various tests
- 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
2022-03-31 15:57:36 -04:00

28 lines
463 B
Swift

// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s
protocol P {
associatedtype T : Q
}
protocol Q {
associatedtype T : R
var t: T { get }
}
protocol R {}
func takesR<T : R>(_: T) {}
class C<T : Q> : P {}
struct Outer<T : P> {
// CHECK-LABEL: .Inner@
// CHECK-NEXT: Generic signature: <T, U where T : C<U>, U : Q>
struct Inner<U> where T : C<U> {
func doStuff(_ u: U) {
takesR(u.t)
}
}
}