<rdar://problem/18311362> TLF: Eliminate implicit bridging conversions

Require 'as' when converting from Objective-C type to native type (but
continue to allow implicit conversion from native to Objective-C). This
conversion constraint is called ExplicitConversion; all implicit
conversions are covered by the existing Conversion constraint. Update
standard library and tests to match.

Swift SVN r24496
This commit is contained in:
Chris Willmore
2015-01-18 00:07:45 +00:00
parent 94bf316fc2
commit 68dd563fbf
36 changed files with 202 additions and 139 deletions

View File

@@ -150,7 +150,7 @@ func checkGraphemeClusterSegmentation(
func checkGraphemeClusterSegmentation(
expectedBoundaries: [Int], #scalars: [UInt32], stackTrace: SourceLocStack
) {
let subject: String = NonContiguousNSString(scalars)
let subject = NonContiguousNSString(scalars) as String
checkGraphemeClusterSegmentation(expectedBoundaries, subject,
stackTrace.withCurrentLoc())
}
@@ -158,7 +158,7 @@ func checkGraphemeClusterSegmentation(
func checkGraphemeClusterSegmentation(
expectedBoundaries: [Int], #codeUnits: [UInt16], stackTrace: SourceLocStack
) {
let subject: String = NonContiguousNSString(codeUnits)
let subject = NonContiguousNSString(codeUnits) as String
checkGraphemeClusterSegmentation(expectedBoundaries, subject,
stackTrace.withCurrentLoc())
}