aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-19 18:28:49 +0100
committerMartin Odersky <odersky@gmail.com>2016-01-19 18:28:49 +0100
commit0ae58a58498d4659e4877f6c3dd836c22e90013d (patch)
treeb09ce972233bbdf6df35831aa7bec49ec817bb28 /src/dotty/tools/dotc/core/Types.scala
parent3686713abe506f5d815fd850e9db012497b1aa5c (diff)
downloaddotty-0ae58a58498d4659e4877f6c3dd836c22e90013d.tar.gz
dotty-0ae58a58498d4659e4877f6c3dd836c22e90013d.tar.bz2
dotty-0ae58a58498d4659e4877f6c3dd836c22e90013d.zip
Small refactoring
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala7
1 files 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