We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 97b249b + c200b0b commit 86bfe3aCopy full SHA for 86bfe3a
validation-test/compiler_crashers_2_fixed/rdar146681539.swift
@@ -0,0 +1,22 @@
1
+// RUN: %target-typecheck-verify-swift
2
+
3
+protocol Q {
4
+ func foo()
5
+}
6
7
+protocol P<T>: AnyObject {
8
+ associatedtype T: Q
9
10
11
+final class C<T: Q>: P {
12
13
14
+struct S: Q {
15
+ func foo() {}
16
17
18
+// This used to return an ErrorType and crash
19
20
+func testit() -> P<S> { // expected-warning {{use of protocol 'P' as a type must be written 'any P'}}
21
+ return C<S>()
22
0 commit comments