mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Don't require paretheses when mixing optional types and array types...
... unless we actually hit one of the confusing cases involving multi-dimensional arrays (e.g., Int[]?[]), at which point one needs to write parentheses <rdar://problem/16737035>. Swift SVN r18181
This commit is contained in:
@@ -411,7 +411,7 @@ extension String {
|
||||
/// \brief a Helper function for the two completePathIntoString overloads below
|
||||
func _completePathIntoString(
|
||||
inout outputName: String?, caseSensitive: Bool,
|
||||
matchesIntoArray: ObjCMutablePointer<NSArray?>, filterTypes: (String[])?) -> Int {
|
||||
matchesIntoArray: ObjCMutablePointer<NSArray?>, filterTypes: String[]?) -> Int {
|
||||
|
||||
var nsOutputName: NSString? = .None
|
||||
|
||||
@@ -436,8 +436,8 @@ extension String {
|
||||
/// returns the actual number of matching paths.
|
||||
func completePathIntoString(
|
||||
inout outputName: String?, caseSensitive: Bool,
|
||||
inout matchesIntoArray: (String[])?,
|
||||
filterTypes: (String[])? = .None
|
||||
inout matchesIntoArray: String[]?,
|
||||
filterTypes: String[]? = .None
|
||||
) -> Int {
|
||||
|
||||
var nsMatches: NSArray? = .None
|
||||
@@ -465,7 +465,7 @@ extension String {
|
||||
func completePathIntoString(
|
||||
inout outputName: String?,
|
||||
caseSensitive: Bool,
|
||||
filterTypes: (String[])? = .None
|
||||
filterTypes: String[]? = .None
|
||||
) -> Int {
|
||||
|
||||
return _completePathIntoString(
|
||||
@@ -1006,7 +1006,7 @@ extension String {
|
||||
/// range and requested tags within the receiving string.
|
||||
func linguisticTagsInRange(
|
||||
range: NSRange, scheme: String, options: NSLinguisticTaggerOptions,
|
||||
orthography: NSOrthography?, inout tokenRanges: (NSRange[])?
|
||||
orthography: NSOrthography?, inout tokenRanges: NSRange[]?
|
||||
) -> String[] {
|
||||
var tokenRanges_: NSArray? = .None
|
||||
var result = self._ns.linguisticTagsInRange(
|
||||
|
||||
Reference in New Issue
Block a user