File tree 2 files changed +8
-5
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1631,7 +1631,10 @@ object SymDenotations {
1631
1631
Stats .record(" basetype cache entries" )
1632
1632
if (! baseTp.exists) Stats .record(" basetype cache NoTypes" )
1633
1633
}
1634
- btrCache.put(tp, baseTp)
1634
+ if (! tp.isProvisional)
1635
+ btrCache.put(tp, baseTp)
1636
+ else
1637
+ btrCache.remove(tp) // Remove any potential sentinel value
1635
1638
}
1636
1639
1637
1640
def ensureAcyclic (baseTp : Type ) = {
@@ -1682,8 +1685,8 @@ object SymDenotations {
1682
1685
case _ =>
1683
1686
val superTp = tp.superType
1684
1687
val baseTp = recur(superTp)
1685
- if (inCache(superTp) && tp.symbol.maybeOwner.isType )
1686
- record(tp, baseTp) // typeref cannot be a GADT, so cache is stable
1688
+ if (inCache(superTp))
1689
+ record(tp, baseTp)
1687
1690
else
1688
1691
btrCache.remove(tp)
1689
1692
baseTp
@@ -1717,8 +1720,6 @@ object SymDenotations {
1717
1720
val baseTp = recur(superTp)
1718
1721
tp match {
1719
1722
case tp : CachedType if baseTp.exists && inCache(superTp) =>
1720
- // Note: This also works for TypeVars: If they are not instantiated, their supertype
1721
- // is a TypeParamRef, which is never cached. So uninstantiated TypeVars are not cached either.
1722
1723
record(tp, baseTp)
1723
1724
case _ =>
1724
1725
}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package object scala {
2
2
// needed for some reasons
3
3
type Throwable = java.lang.Throwable
4
4
type IndexOutOfBoundsException = java.lang.IndexOutOfBoundsException
5
+ type List [+ A ] = scala.collection.immutable.List [A ]
6
+ type Iterable [+ A ] = scala.collection.Iterable [A ]
5
7
6
8
type Seq [A ] = scala.collection.Seq [A ]
7
9
val Seq = scala.collection.Seq
You can’t perform that action at this time.
0 commit comments