aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-02 18:38:07 +0200
committerMartin Odersky <odersky@gmail.com>2013-10-02 18:38:07 +0200
commitee9405e7ecfc57038bcf8a20ecdaf5afd47e4acd (patch)
treed97b7d43a8cd3bd7719b28b7e043f53b1a50f516 /src/dotty/tools/dotc/core/SymDenotations.scala
parentfda5cdccad52657191e756ad2d47595a9c25b0ff (diff)
downloaddotty-ee9405e7ecfc57038bcf8a20ecdaf5afd47e4acd.tar.gz
dotty-ee9405e7ecfc57038bcf8a20ecdaf5afd47e4acd.tar.bz2
dotty-ee9405e7ecfc57038bcf8a20ecdaf5afd47e4acd.zip
Prefiltering members in computeMembers ...
… to drop any member that uniquely defines a symbol that's already in the predenotation. This avoids merging the same symbols repeatedly in case of diamond inheritance.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 845672149..8a4cdf1e5 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -53,6 +53,8 @@ object SymDenotations {
//assert(symbol.id != 4940, name)
+ override def hasUniqueSym: Boolean = exists
+
// ------ Getting and setting fields -----------------------------
private[this] var myFlags: FlagSet = adaptFlags(initFlags)
@@ -932,6 +934,7 @@ object SymDenotations {
}
denots1 union
parentd.membersNamed(name)
+ .dropUniqueRefsIn(denots1)
.filterExcluded(Private)
.disjointAsSeenFrom(ownDenots, thisType)
case _ =>