Skip to content

Commit c00a264

Browse files
committed
Move assert
1 parent 034bd09 commit c00a264

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8832,6 +8832,7 @@ module ts {
88328832
}
88338833

88348834
function getIteratedType(iterable: Type, expressionForError: Expression): Type {
8835+
Debug.assert(languageVersion >= ScriptTarget.ES6);
88358836
var iteratedType = getIteratedTypeSubroutine(iterable, expressionForError);
88368837
// Now even though we have extracted the iteratedType, we will have to validate that the type
88378838
// passed in is actually an Iterable.
@@ -8843,7 +8844,6 @@ module ts {
88438844
return iteratedType;
88448845

88458846
function getIteratedTypeSubroutine(iterable: Type, expressionForError: Expression) {
8846-
Debug.assert(languageVersion >= ScriptTarget.ES6);
88478847
if (allConstituentTypesHaveKind(iterable, TypeFlags.Any)) {
88488848
return iterable; // any or unknown
88498849
}

0 commit comments

Comments
 (0)