File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
test/library-tests/modifiers Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -96,24 +96,32 @@ class Modifiable extends Declaration, @modifiable {
9696 /** Holds if this declaration is `async`. */
9797 predicate isAsync ( ) { this .hasModifier ( "async" ) }
9898
99+ private predicate isReallyPrivate ( ) { this .isPrivate ( ) and not this .isProtected ( ) }
100+
99101 /**
100102 * Holds if this declaration is effectively `private` (either directly or
101103 * because one of the enclosing types is `private`).
102104 */
103105 predicate isEffectivelyPrivate ( ) {
104- this .isPrivate ( ) or
105- this .getDeclaringType + ( ) .isPrivate ( ) or
106+ this .isReallyPrivate ( ) or
107+ this .getDeclaringType + ( ) .( Modifiable ) . isReallyPrivate ( ) or
106108 this .( Virtualizable ) .getExplicitlyImplementedInterface ( ) .isEffectivelyPrivate ( )
107109 }
108110
111+ private predicate isReallyInternal ( ) {
112+ this .isInternal ( ) and not this .isProtected ( )
113+ or
114+ this .isPrivate ( ) and this .isProtected ( )
115+ }
116+
109117 /**
110118 * Holds if this declaration is effectively `internal` (either directly or
111119 * because one of the enclosing types is `internal`).
112120 */
113121 predicate isEffectivelyInternal ( ) {
114- this .isInternal ( ) or
115- this .getDeclaringType + ( ) .isInternal ( ) or
116- this .( Virtualizable ) .getExplicitlyImplementedInterface ( ) .isInternal ( )
122+ this .isReallyInternal ( ) or
123+ this .getDeclaringType + ( ) .( Modifiable ) . isReallyInternal ( ) or
124+ this .( Virtualizable ) .getExplicitlyImplementedInterface ( ) .isEffectivelyInternal ( )
117125 }
118126
119127 /**
Original file line number Diff line number Diff line change 2727| Modifiers.cs:68:14:68:15 | M1 | internal |
2828| Modifiers.cs:71:18:71:19 | C2 | public |
2929| Modifiers.cs:73:17:73:18 | M1 | internal |
30+ | Modifiers.cs:75:32:75:33 | M2 | internal |
31+ | Modifiers.cs:76:33:76:34 | M3 | public |
You can’t perform that action at this time.
0 commit comments