Skip to content

Commit db09546

Browse files
authored
Merge pull request #68407 from atrick/test-todo
Remove a TODO from noimplicitcopy_trivial.swift
2 parents ca3e3aa + 56de283 commit db09546

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/SILOptimizer/noimplicitcopy_trivial.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,6 @@ public func test3(i: consuming Int) -> Int {
10931093
takeClosure { i }
10941094
}
10951095

1096-
// TODO: incorrect diagnostic:
1097-
// error: 'i' cannot be captured by an escaping closure since it is a borrowed parameter
1098-
// public func test4(i: borrowing Int) -> Int {
1099-
// takeClosure { i }
1100-
// }
1096+
public func test4(i: borrowing Int) -> Int { // expected-error {{'i' cannot be captured by an escaping closure}}
1097+
takeClosure { i } // expected-note {{closure capturing 'i' here}}
1098+
}

0 commit comments

Comments
 (0)