@@ -972,8 +972,8 @@ module ts {
972
972
973
973
return {
974
974
string : ( ) => str ,
975
- writeKind : ( text , kind ) => str += text ,
976
- writeSymbol : ( text , symbol ) => str += text ,
975
+ writeKind : text => str += text ,
976
+ writeSymbol : text => str += text ,
977
977
978
978
// Completely ignore indentation for string writers. And map newlines to
979
979
// a single space.
@@ -6513,10 +6513,10 @@ module ts {
6513
6513
return undefined ;
6514
6514
}
6515
6515
6516
- function computeEnumMemberValues ( node : EnumDeclaration , reportErrors : boolean ) {
6516
+ function computeEnumMemberValues ( node : EnumDeclaration ) {
6517
6517
var nodeLinks = getNodeLinks ( node ) ;
6518
6518
6519
- if ( ! ( nodeLinks . flags & NodeCheckFlags . EnumValuesComputedAndChecked ) ) {
6519
+ if ( ! ( nodeLinks . flags & NodeCheckFlags . EnumValuesComputed ) ) {
6520
6520
var enumSymbol = getSymbolOfNode ( node ) ;
6521
6521
var enumType = getDeclaredTypeOfSymbol ( enumSymbol ) ;
6522
6522
var autoValue = 0 ;
@@ -6531,7 +6531,7 @@ module ts {
6531
6531
// If it is a constant value (not undefined), it is syntactically constrained to be a number.
6532
6532
// Also, we do not need to check this for ambients because there is already
6533
6533
// a syntax error if it is not a constant.
6534
- if ( reportErrors ) {
6534
+ if ( fullTypeCheck ) {
6535
6535
checkTypeAssignableTo ( checkExpression ( initializer ) , enumType , initializer , /*chainedMessage*/ undefined , /*terminalMessage*/ undefined ) ;
6536
6536
}
6537
6537
}
@@ -6545,9 +6545,7 @@ module ts {
6545
6545
}
6546
6546
} ) ;
6547
6547
6548
- if ( reportErrors ) {
6549
- nodeLinks . flags |= NodeCheckFlags . EnumValuesComputedAndChecked ;
6550
- }
6548
+ nodeLinks . flags |= NodeCheckFlags . EnumValuesComputed ;
6551
6549
}
6552
6550
}
6553
6551
@@ -6561,7 +6559,7 @@ module ts {
6561
6559
checkCollistionWithRequireExportsInGeneratedCode ( node , node . name ) ;
6562
6560
checkExportsOnMergedDeclarations ( node ) ;
6563
6561
6564
- computeEnumMemberValues ( node , /*reportErrors:*/ true ) ;
6562
+ computeEnumMemberValues ( node ) ;
6565
6563
6566
6564
// Spec 2014 - Section 9.3:
6567
6565
// It isn't possible for one enum declaration to continue the automatic numbering sequence of another,
@@ -7531,7 +7529,7 @@ module ts {
7531
7529
}
7532
7530
7533
7531
function getEnumMemberValue ( node : EnumMember ) : number {
7534
- computeEnumMemberValues ( < EnumDeclaration > node . parent , /*reportErrors:*/ false ) ;
7532
+ computeEnumMemberValues ( < EnumDeclaration > node . parent ) ;
7535
7533
return getNodeLinks ( node ) . enumMemberValue ;
7536
7534
}
7537
7535
0 commit comments