@@ -187,46 +187,34 @@ object SymDenotations {
187187 if (isCurrent(fs)) myFlags else flags
188188
189189 /** 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)
194192
195193 /** 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)
200196
201197 /** Has this denotation the given flag set, whereas none of the flags
202198 * in `butNot` are set?
203199 */
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)
208202
209203 /** Has this denotation one of the flags in `fs` set, whereas none of the flags
210204 * in `butNot` are set?
211205 */
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)
216208
217209 /** 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)
222212
223213 /** Has this denotation all of the flags in `fs` set, whereas none of the flags
224214 * in `butNot` are set?
225215 */
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)
230218
231219 /** The type info, or, if symbol is not yet completed, the completer */
232220 final def infoOrCompleter : Type = myInfo
0 commit comments