aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala5
-rw-r--r--src/dotty/tools/dotc/transform/Constructors.scala2
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala9
3 files changed, 9 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 88af3886d..bde8cc10a 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1526,10 +1526,7 @@ object SymDenotations {
val decls1 = newScope
for (tparam <- tparams) decls1.enter(decls.lookup(tparam.name))
for (sym <- decls) if (!typeParams.contains(sym)) decls1.enter(sym)
- val ci = classInfo
- // dotty deviation; overloading resolution on next line fails if prefix `ci` is not a value.
- // See test pending/pos/overloaddefault.scala
- info = ci.derivedClassInfo(decls = decls1)
+ info = classInfo.derivedClassInfo(decls = decls1)
myTypeParams = null
}
diff --git a/src/dotty/tools/dotc/transform/Constructors.scala b/src/dotty/tools/dotc/transform/Constructors.scala
index 265ad3217..b6ebd7d90 100644
--- a/src/dotty/tools/dotc/transform/Constructors.scala
+++ b/src/dotty/tools/dotc/transform/Constructors.scala
@@ -246,7 +246,7 @@ class Constructors extends MiniPhaseTransform with SymTransformer { thisTransfor
// Drop accessors that are not retained from class scope
if (dropped.nonEmpty) {
- val clsInfo = cls.classInfo // TODO investigate: expand clsInfo to cls.info => dotty type error
+ val clsInfo = cls.classInfo
cls.copy(
info = clsInfo.derivedClassInfo(
decls = clsInfo.decls.filteredScope(!dropped.contains(_))))
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 649b8088f..86980f337 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -262,8 +262,13 @@ trait Applications extends Compatibility { self: Typer =>
val receiver: Tree = methPart(normalizedFun) match {
case Select(receiver, _) => receiver
case mr => mr.tpe.normalizedPrefix match {
- case mr: TermRef => ref(mr)
- case _ => EmptyTree
+ case mr: TermRef =>
+ ref(mr)
+ case mr: TypeRef if this.isInstanceOf[TestApplication[_]] =>
+ // In this case it is safe to skolemize now; we will produce a stable prefix for the actual call.
+ ref(mr.narrow)
+ case _ =>
+ EmptyTree
}
}
val getterPrefix =