@@ -187,46 +187,34 @@ object SymDenotations {
187
187
if (isCurrent(fs)) myFlags else flags
188
188
189
189
/** Has this denotation one of given flag set? */
190
- final def is (flag : Flag )(implicit ctx : Context ): Boolean = {
191
- val toTest = if (isCurrent(flag)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
192
- toTest.is(flag)
193
- }
190
+ final def is (flag : Flag )(implicit ctx : Context ): Boolean =
191
+ (if (isCurrent(flag)) myFlags else flags).is(flag)
194
192
195
193
/** Has this denotation one of the flags in `fs` set? */
196
- final def isOneOf (fs : FlagSet )(implicit ctx : Context ): Boolean = {
197
- val toTest = if (isCurrent(fs)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
198
- toTest.isOneOf(fs)
199
- }
194
+ final def isOneOf (fs : FlagSet )(implicit ctx : Context ): Boolean =
195
+ (if (isCurrent(fs)) myFlags else flags).isOneOf(fs)
200
196
201
197
/** Has this denotation the given flag set, whereas none of the flags
202
198
* in `butNot` are set?
203
199
*/
204
- final def is (flag : Flag , butNot : FlagSet )(implicit ctx : Context ): Boolean = {
205
- val toTest = if (isCurrent(flag) && isCurrent(butNot)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
206
- toTest.is(flag, butNot)
207
- }
200
+ final def is (flag : Flag , butNot : FlagSet )(implicit ctx : Context ): Boolean =
201
+ (if (isCurrent(flag) && isCurrent(butNot)) myFlags else flags).is(flag, butNot)
208
202
209
203
/** Has this denotation one of the flags in `fs` set, whereas none of the flags
210
204
* in `butNot` are set?
211
205
*/
212
- final def isOneOf (fs : FlagSet , butNot : FlagSet )(implicit ctx : Context ): Boolean = {
213
- val toTest = if (isCurrent(fs) && isCurrent(butNot)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
214
- toTest.isOneOf(fs, butNot)
215
- }
206
+ final def isOneOf (fs : FlagSet , butNot : FlagSet )(implicit ctx : Context ): Boolean =
207
+ (if (isCurrent(fs) && isCurrent(butNot)) myFlags else flags).isOneOf(fs, butNot)
216
208
217
209
/** Has this denotation all of the flags in `fs` set? */
218
- final def isAllOf (fs : FlagSet )(implicit ctx : Context ): Boolean = {
219
- val toTest = if (isCurrent(fs)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
220
- toTest.isAllOf(fs)
221
- }
210
+ final def isAllOf (fs : FlagSet )(implicit ctx : Context ): Boolean =
211
+ (if (isCurrent(fs)) myFlags else flags).isAllOf(fs)
222
212
223
213
/** Has this denotation all of the flags in `fs` set, whereas none of the flags
224
214
* in `butNot` are set?
225
215
*/
226
- final def isAllOf (fs : FlagSet , butNot : FlagSet )(implicit ctx : Context ): Boolean = {
227
- val toTest = if (isCurrent(fs) && isCurrent(butNot)) myFlags else flags // TODO: combine these two lines once 0.17 is released and #6706 is in
228
- toTest.isAllOf(fs, butNot)
229
- }
216
+ final def isAllOf (fs : FlagSet , butNot : FlagSet )(implicit ctx : Context ): Boolean =
217
+ (if (isCurrent(fs) && isCurrent(butNot)) myFlags else flags).isAllOf(fs, butNot)
230
218
231
219
/** The type info, or, if symbol is not yet completed, the completer */
232
220
final def infoOrCompleter : Type = myInfo
0 commit comments