Skip to content

Commit 9a67526

Browse files
authored
Merge pull request swiftlang#19527 from slavapestov/add-regression-test
Add regression test for fixed crasher
2 parents 4dad880 + eb9fb45 commit 9a67526

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Constraints/valid_pointer_conversions.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
func foo(_ a: [[UInt8]], _ p: [UnsafeRawPointer]) {
44
foo(a, a) // expect-warning {{all paths through this function will call itself}}
55
}
6+
7+
// rdar://problem/44658089
8+
func takesPtr(_: UnsafePointer<UInt8>) {}
9+
10+
func givesPtr(_ str: String) {
11+
takesPtr(UnsafePointer(str))
12+
}

0 commit comments

Comments
 (0)