From 24753c48858cec8193d65631b741e3feeda3d040 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Tue, 4 Aug 2015 17:53:01 -0700 Subject: [PATCH] remove asserts --- src/compiler/scanner.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 55e58bb4d46..8aaed566671 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -319,10 +319,10 @@ namespace ts { } /* @internal */ + /** + * We assume the first line starts at position 0 and 'position' is non-negative. + */ export function computeLineAndCharacterOfPosition(lineStarts: number[], position: number) { - Debug.assert(lineStarts.length && lineStarts[0] === 0, "the first line should start at position 0"); - Debug.assert(0 <= position, "position should be positive"); - let lineNumber = binarySearch(lineStarts, position); if (lineNumber < 0) { // If the actual position was not found,