aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-03-17 23:45:13 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-05-28 21:47:28 +0200
commite9adc8a690fc1a1aebeebfa5a68c76e193c993ef (patch)
tree3f8f75da95efbbb1f331bc2c029e8ea1d95c9ee5 /src/dotty/tools/dotc/core/Types.scala
parentca2fb9d4890b0fd58e071b0c7baae8bdeaf9fcd4 (diff)
downloaddotty-e9adc8a690fc1a1aebeebfa5a68c76e193c993ef.tar.gz
dotty-e9adc8a690fc1a1aebeebfa5a68c76e193c993ef.tar.bz2
dotty-e9adc8a690fc1a1aebeebfa5a68c76e193c993ef.zip
Fix memberExcluding for ClassInfo
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index cec6fd3b1..50800bec7 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -415,8 +415,16 @@ object Types {
memberExcluding(name, Flags.Private)
}
- final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation =
- findMember(name, widenIfUnstable, excluding)
+ final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation = {
+ // We need a valid prefix for `asSeenFrom`
+ val pre = this match {
+ case tp: ClassInfo =>
+ tp.typeRef
+ case _ =>
+ widenIfUnstable
+ }
+ findMember(name, pre, excluding)
+ }
/** Find member of this type with given name and
* produce a denotation that contains the type of the member