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.
1 parent e8c92c3 commit ca81a14Copy full SHA for ca81a14
validation-test/compiler_crashers_2_fixed/issue43442.swift
@@ -0,0 +1,13 @@
1
+// RUN: %target-swift-frontend %s -typecheck
2
+
3
+// https://github.com/apple/swift/issues/43442
4
5
+func quickSort<T: Comparable>(_ a: [T]) -> [T] {
6
+ if a.isEmpty {
7
+ return a
8
+ } else {
9
+ let head = a[0]
10
+ let body = a[1..<a.count]
11
+ return quickSort(body.filter({$0 < head})) + [head] + quickSort(body.filter({$0 >= head}))
12
+ }
13
+}
0 commit comments