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 {
96
96
/** Holds if this declaration is `async`. */
97
97
predicate isAsync ( ) { this .hasModifier ( "async" ) }
98
98
99
+ private predicate isReallyPrivate ( ) { this .isPrivate ( ) and not this .isProtected ( ) }
100
+
99
101
/**
100
102
* Holds if this declaration is effectively `private` (either directly or
101
103
* because one of the enclosing types is `private`).
102
104
*/
103
105
predicate isEffectivelyPrivate ( ) {
104
- this .isPrivate ( ) or
105
- this .getDeclaringType + ( ) .isPrivate ( ) or
106
+ this .isReallyPrivate ( ) or
107
+ this .getDeclaringType + ( ) .( Modifiable ) . isReallyPrivate ( ) or
106
108
this .( Virtualizable ) .getExplicitlyImplementedInterface ( ) .isEffectivelyPrivate ( )
107
109
}
108
110
111
+ private predicate isReallyInternal ( ) {
112
+ this .isInternal ( ) and not this .isProtected ( )
113
+ or
114
+ this .isPrivate ( ) and this .isProtected ( )
115
+ }
116
+
109
117
/**
110
118
* Holds if this declaration is effectively `internal` (either directly or
111
119
* because one of the enclosing types is `internal`).
112
120
*/
113
121
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 ( )
117
125
}
118
126
119
127
/**
Original file line number Diff line number Diff line change 27
27
| Modifiers.cs:68:14:68:15 | M1 | internal |
28
28
| Modifiers.cs:71:18:71:19 | C2 | public |
29
29
| 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