From 0ae58a58498d4659e4877f6c3dd836c22e90013d Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 19 Jan 2016 18:28:49 +0100 Subject: Small refactoring --- src/dotty/tools/dotc/core/Types.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index cc81b9558..e266bab6f 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -406,14 +406,17 @@ object Types { /** The member of this type with the given name */ final def member(name: Name)(implicit ctx: Context): Denotation = /*>|>*/ track("member") /*<|<*/ { - findMember(name, widenIfUnstable, EmptyFlags) + memberExcluding(name, EmptyFlags) } /** The non-private member of this type with the given name. */ final def nonPrivateMember(name: Name)(implicit ctx: Context): Denotation = track("nonPrivateMember") { - findMember(name, widenIfUnstable, Flags.Private) + memberExcluding(name, Flags.Private) } + final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation = + findMember(name, widenIfUnstable, excluding) + /** Find member of this type with given name and * produce a denotation that contains the type of the member * as seen from given prefix `pre`. Exclude all members that have -- cgit v1.2.3