Skip to content

Commit c35d0f4

Browse files
authored
Merge pull request #500 from CodaFi/foundational-semantics
2 parents 6df9642 + 806068c commit c35d0f4

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

Sources/SwiftSyntax/SourceLocation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public final class SourceLocationConverter {
134134
public init(file: String, source: String) {
135135
self.file = file
136136
(self.lines, endOfFile) = computeLines(source)
137-
assert(source.lengthOfBytes(using: .utf8) == endOfFile.utf8Offset)
137+
assert(source.utf8.count == endOfFile.utf8Offset)
138138
}
139139

140140
/// Convert a `AbsolutePosition` to a `SourceLocation`. If the position is

Sources/SwiftSyntax/Trivia.swift.gyb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
//
1818
//===----------------------------------------------------------------------===//
1919

20-
import Foundation
21-
2220
/// A contiguous stretch of a single kind of trivia. The constituent part of
2321
/// a `Trivia` collection.
2422
///

Sources/SwiftSyntax/gyb_generated/Trivia.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import Foundation
16-
1715
/// A contiguous stretch of a single kind of trivia. The constituent part of
1816
/// a `Trivia` collection.
1917
///

0 commit comments

Comments
 (0)