mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
314 B
Swift
13 lines
314 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func foo(_ a: [[UInt8]], _ p: [UnsafeRawPointer]) {
|
|
foo(a, a) // expect-warning {{all paths through this function will call itself}}
|
|
}
|
|
|
|
// rdar://problem/44658089
|
|
func takesPtr(_: UnsafePointer<UInt8>) {}
|
|
|
|
func givesPtr(_ str: String) {
|
|
takesPtr(UnsafePointer(str))
|
|
}
|