mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
<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:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user