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 052ae1f + 3556fdf commit 180a136Copy full SHA for 180a136
validation-test/compiler_crashers_2/sr11232.swift
@@ -0,0 +1,26 @@
1
+// RUN: not --crash %target-swift-emit-silgen %s
2
+
3
+protocol Pub {
4
+ associatedtype Other
5
+ associatedtype Failure: Error
6
+}
7
8
+class AnyPub<Other, Failure: Error> {}
9
10
+extension Pub {
11
+ func erase() -> AnyPub<Other, Failure> {
12
+ return AnyPub<Other, Failure>()
13
+ }
14
15
16
+protocol ObsObj : Pub {
17
+ associatedtype NeverPub : Pub where Self.NeverPub.Failure == Never
18
19
20
+class Subject<Other, Failure: Error> : Pub {}
21
22
+extension Pub where Other: ObsObj, Other.NeverPub: Subject<Int, Error> {
23
+ static func f() -> AnyPub<Other.NeverPub.Other, Other.NeverPub.Failure> {
24
+ return Subject<Other.NeverPub.Other, Other.NeverPub.Failure>().erase()
25
26
0 commit comments