File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,7 @@ extension StringProtocol {
738
738
739
739
public // SPI(Foundation)
740
740
func _toUTF16Indices( _ range: Range < Int > ) -> Range < Index > {
741
+ #if hasFeature(Macros)
741
742
if Self . self == String . self {
742
743
let s = unsafeBitCast ( self , to: String . self)
743
744
return s. utf16. _indexRange ( for: range, from: s. startIndex)
@@ -746,6 +747,7 @@ extension StringProtocol {
746
747
let s = unsafeBitCast ( self , to: Substring . self)
747
748
return s. _slice. _base. utf16. _indexRange ( for: range, from: s. startIndex)
748
749
}
750
+ #endif
749
751
let lowerbound = _toUTF16Index ( range. lowerBound)
750
752
let upperbound = _toUTF16Index ( range. upperBound)
751
753
return Range ( uncheckedBounds: ( lower: lowerbound, upper: upperbound) )
You can’t perform that action at this time.
0 commit comments