mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add primitive type-checker rules for pointer arguments. An UnsafePointer argument accepts: - an UnsafePointer value of matching element type, or of any type if the argument is UnsafePointer<Void>, - an inout parameter of matching element type, or of any type if the argument is UnsafePointer<Void>, or - an inout Array parameter of matching element type, or of any type if the argument is UnsafePointer<Void>. A ConstUnsafePointer argument accepts: - an UnsafePointer, ConstUnsafePointer, or AutoreleasingUnsafePointer value of matching element type, or of any type if the argument is ConstUnsafePointer<Void>, - an inout parameter of matching element type, or of any type if the argument is ConstUnsafePointer<Void>, or - an inout or non-inout Array parameter of matching element type, or of any type if the argument is ConstUnsafePointer<Void>. An AutoreleasingUnsafePointer argument accepts: - an AutoreleasingUnsafePointer value of matching element type, or - an inout parameter of matching element type. This disrupts some error messages in unrelated tests, which is tracked by <rdar://problem/17380520>. Swift SVN r19008
32 KiB
32 KiB