use a normal for loop instead of a forEach

This commit is contained in:
Cyrus Najmabadi 2014-11-19 20:55:11 -08:00
parent a6bb527278
commit 76e01396c1

View File

@ -4263,9 +4263,12 @@ module ts {
if (!node.modifiers) {
return checkTopLevelDeclareModifierInAmbientContext(node);
}
var lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node;
var flags = 0;
var hasErrors = forEach(node.modifiers, m => {
for (var i = 0, n = node.modifiers.length; i < n; i++) {
var m = node.modifiers[i];
switch (m.kind) {
case SyntaxKind.PublicKeyword:
case SyntaxKind.ProtectedKeyword:
@ -4342,10 +4345,6 @@ module ts {
lastDeclare = m;
break;
}
});
if (hasErrors) {
return true;
}
if (node.kind === SyntaxKind.Constructor) {