Skip to content

Commit 0882a07

Browse files
committedFeb 2, 2025
Regression test for rdar://problem/143338891
1 parent f35dd66 commit 0882a07

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎test/Constraints/closures.swift

+11
Original file line numberDiff line numberDiff line change
@@ -1326,3 +1326,14 @@ do {
13261326
var items: [Test.Item] { .init(list.items.compactMap { .init(item: $0) }) } // Ok
13271327
}
13281328
}
1329+
1330+
// This should type check
1331+
func rdar143338891() {
1332+
func takesAny(_: Any?) {}
1333+
1334+
class Test {
1335+
func test() {
1336+
_ = { [weak self] in takesAny(self) }
1337+
}
1338+
}
1339+
}

0 commit comments

Comments
 (0)
Please sign in to comment.