File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-ir -O %s | %FileCheck %s
2
+
3
+ // This is a compile-only test. It checks that the compiler does not crash for
4
+ // a partial_apply with "unusual" conformances: rdar://problem/59456064
5
+
6
+ public struct Inner < Element> { }
7
+
8
+ extension Inner : Equatable where Element: Equatable {
9
+ public static func == ( lhs: Inner < Element > , rhs: Inner < Element > ) -> Bool {
10
+ return false
11
+ }
12
+ }
13
+
14
+ public struct Outer < Value> { }
15
+
16
+ extension Outer : Equatable where Value: Equatable {
17
+ public static func == ( lhs: Outer < Value > , rhs: Outer < Value > ) -> Bool {
18
+ return false
19
+ }
20
+ }
21
+
22
+ @inline ( never)
23
+ func foo< Element> ( _ x: Element , _ equal: ( Element , Element ) -> Bool ) {
24
+ _ = equal ( x, x)
25
+ }
26
+
27
+ // CHECK: define {{.*}}testit
28
+ public func testit< Element: Equatable > ( _ x: Outer < Inner < Element > > ) {
29
+ foo ( x, == )
30
+ }
31
+
You can’t perform that action at this time.
0 commit comments