File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -5211,8 +5211,7 @@ module ts {
5211
5211
var otherKind = node . kind === SyntaxKind . GetAccessor ? SyntaxKind . SetAccessor : SyntaxKind . GetAccessor ;
5212
5212
var otherAccessor = < AccessorDeclaration > getDeclarationOfKind ( node . symbol , otherKind ) ;
5213
5213
if ( otherAccessor ) {
5214
- var visibilityFlags = NodeFlags . Private | NodeFlags . Public ;
5215
- if ( ( ( node . flags & visibilityFlags ) !== ( otherAccessor . flags & visibilityFlags ) ) ) {
5214
+ if ( ( ( node . flags & NodeFlags . AccessibilityModifier ) !== ( otherAccessor . flags & NodeFlags . AccessibilityModifier ) ) ) {
5216
5215
error ( node . name , Diagnostics . Getter_and_setter_accessors_do_not_agree_in_visibility ) ;
5217
5216
}
5218
5217
Original file line number Diff line number Diff line change @@ -1431,7 +1431,7 @@ module ts {
1431
1431
1432
1432
function emitParameterPropertyAssignments ( node : ConstructorDeclaration ) {
1433
1433
forEach ( node . parameters , param => {
1434
- if ( param . flags & ( NodeFlags . Public | NodeFlags . Private ) ) {
1434
+ if ( param . flags & NodeFlags . AccessibilityModifier ) {
1435
1435
writeLine ( ) ;
1436
1436
emitStart ( param ) ;
1437
1437
emitStart ( param . name ) ;
@@ -2630,7 +2630,7 @@ module ts {
2630
2630
function emitParameterProperties ( constructorDeclaration : ConstructorDeclaration ) {
2631
2631
if ( constructorDeclaration ) {
2632
2632
forEach ( constructorDeclaration . parameters , param => {
2633
- if ( param . flags & ( NodeFlags . Public | NodeFlags . Private ) ) {
2633
+ if ( param . flags & NodeFlags . AccessibilityModifier ) {
2634
2634
emitPropertyDeclaration ( param ) ;
2635
2635
}
2636
2636
} ) ;
Original file line number Diff line number Diff line change @@ -3213,7 +3213,7 @@ module ts {
3213
3213
3214
3214
switch ( modifierToken ) {
3215
3215
case SyntaxKind . PublicKeyword :
3216
- if ( flags & NodeFlags . Private || flags & NodeFlags . Public ) {
3216
+ if ( flags & NodeFlags . AccessibilityModifier ) {
3217
3217
grammarErrorAtPos ( modifierStart , modifierLength , Diagnostics . Accessibility_modifier_already_seen ) ;
3218
3218
}
3219
3219
else if ( flags & NodeFlags . Static ) {
@@ -3226,7 +3226,7 @@ module ts {
3226
3226
break ;
3227
3227
3228
3228
case SyntaxKind . PrivateKeyword :
3229
- if ( flags & NodeFlags . Private || flags & NodeFlags . Public ) {
3229
+ if ( flags & NodeFlags . AccessibilityModifier ) {
3230
3230
grammarErrorAtPos ( modifierStart , modifierLength , Diagnostics . Accessibility_modifier_already_seen ) ;
3231
3231
}
3232
3232
else if ( flags & NodeFlags . Static ) {
You can’t perform that action at this time.
0 commit comments