aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-15 11:56:55 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-17 17:53:39 +0100
commit17a5066c0692a0ad0cdc5a38e3b549ace8fc5e06 (patch)
treefe72788cd9516e9eab9706fce5ceb0e92b2e383c /src/dotty/tools/dotc/core/SymDenotations.scala
parente5fcf57b1e62e420c611ed58d475d081d95f9048 (diff)
downloaddotty-17a5066c0692a0ad0cdc5a38e3b549ace8fc5e06.tar.gz
dotty-17a5066c0692a0ad0cdc5a38e3b549ace8fc5e06.tar.bz2
dotty-17a5066c0692a0ad0cdc5a38e3b549ace8fc5e06.zip
Packages are never fully completed
The previous commit made packages always fully completed. This is wrong - since new members can be added to packages at any time, packages are never fully completed.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 00ca99da5..64862418a 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1211,6 +1211,7 @@ object SymDenotations {
/** The denotation is fully completed: all attributes are fully defined.
* ClassDenotations compiled from source are first completed, then fully completed.
+ * Packages are never fully completed since members can be added at any time.
* @see Namer#ClassCompleter
*/
private def isFullyCompleted(implicit ctx: Context): Boolean = {
@@ -1218,11 +1219,11 @@ object SymDenotations {
case d: ClassDenotation => d.isFullyCompleted
case _ => false
}
- def isLocallyFullyCompleted =
- if (classParents.isEmpty) is(Package) || symbol.eq(defn.AnyClass)
+ def testFullyCompleted =
+ if (classParents.isEmpty) !is(Package) && symbol.eq(defn.AnyClass)
else classParents.forall(isFullyCompletedRef)
flagsUNSAFE.is(FullyCompleted) ||
- isCompleted && isLocallyFullyCompleted && { setFlag(FullyCompleted); true }
+ isCompleted && testFullyCompleted && { setFlag(FullyCompleted); true }
}
// ------ syncing inheritance-related info -----------------------------