Skip to content

Commit 0ae58a5

Browse files
committed
Small refactoring
1 parent 3686713 commit 0ae58a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,17 @@ object Types {
406406

407407
/** The member of this type with the given name */
408408
final def member(name: Name)(implicit ctx: Context): Denotation = /*>|>*/ track("member") /*<|<*/ {
409-
findMember(name, widenIfUnstable, EmptyFlags)
409+
memberExcluding(name, EmptyFlags)
410410
}
411411

412412
/** The non-private member of this type with the given name. */
413413
final def nonPrivateMember(name: Name)(implicit ctx: Context): Denotation = track("nonPrivateMember") {
414-
findMember(name, widenIfUnstable, Flags.Private)
414+
memberExcluding(name, Flags.Private)
415415
}
416416

417+
final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation =
418+
findMember(name, widenIfUnstable, excluding)
419+
417420
/** Find member of this type with given name and
418421
* produce a denotation that contains the type of the member
419422
* as seen from given prefix `pre`. Exclude all members that have

0 commit comments

Comments
 (0)