diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-25 15:19:38 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-25 15:19:54 +0100 |
commit | 7260b2607a4b0249f63bb75dac6143e902b91c66 (patch) | |
tree | 1b4d8791107407e75bfff1006c172a9d3ede8509 /src/dotty/tools/dotc/core/Denotations.scala | |
parent | 9a474a87b86105e0b5b935e8b20dc3fc25338da4 (diff) | |
download | dotty-7260b2607a4b0249f63bb75dac6143e902b91c66.tar.gz dotty-7260b2607a4b0249f63bb75dac6143e902b91c66.tar.bz2 dotty-7260b2607a4b0249f63bb75dac6143e902b91c66.zip |
Fix for denotsNamed.
Previously, the filterDisjoint forced the signature computation too eagerly, which led to a stub for AnyRef.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 79899f70a..50b01be51 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -515,7 +515,7 @@ object Denotations { final def filterWithPredicate(p: SingleDenotation => Boolean): SingleDenotation = if (p(this)) this else NoDenotation final def filterDisjoint(denots: PreDenotation)(implicit ctx: Context): SingleDenotation = - if (denots.containsSig(signature)) NoDenotation else this + if (denots.exists && denots.containsSig(signature)) NoDenotation else this def mapInherited(ownDenots: PreDenotation, prevDenots: PreDenotation, pre: Type)(implicit ctx: Context): SingleDenotation = if (hasUniqueSym && prevDenots.containsSym(symbol)) NoDenotation else if (isType) filterDisjoint(ownDenots).asSeenFrom(pre) |