Skip to content

Commit c717e42

Browse files
committed
[test] Add some already-fixed crashers
1 parent bac0856 commit c717e42

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// https://github.com/swiftlang/swift/issues/51844
2+
3+
func doStuff(_ handler: () -> Void) { }
4+
5+
// CHECK: [[@LINE+1]]:17-[[@LINE+1]]:22 source.refactoring.range.kind.basename
6+
func merge<T>(_ param: T) {
7+
func makeHandler(_ successHandler: (T) -> T) -> () -> Void {
8+
return {}
9+
}
10+
// RUN: %sourcekitd-test -req=find-local-rename-ranges -pos=%(line+1):42 %s -- %s | %FileCheck %s
11+
doStufff(makeHandler { (success: T) in param})
12+
// CHECK: [[@LINE-1]]:42-[[@LINE-1]]:47 source.refactoring.range.kind.basename
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
2+
// https://github.com/swiftlang/swift/issues/65817
3+
protocol Publisher<Output, Failure> {
4+
associatedtype Output
5+
associatedtype Failure : Error
6+
}
7+
func pnReceive<P: Publisher>(_ publisher: P) where P.Failure == Never
8+
func test() {
9+
pnReceive(#^COMPLETE^#) { }
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
2+
// https://github.com/swiftlang/swift/issues/75898
3+
extension Result {
4+
typealias Value = Success
5+
6+
init(value: Value) {}
7+
8+
func tryMap() {
9+
return flatMap { value in }#^COMPLETE^#
10+
}
11+
}

0 commit comments

Comments
 (0)