aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index d6dc81d4e..854c7e2f6 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -2109,14 +2109,14 @@ object Types {
if ((prefix eq cls.owner.thisType) || !cls.owner.isClass) tp
else tp.substThis(cls.owner.asClass, prefix)
- private var tyconCache: TypeRef = null
+ private var tyconCache: Type = null
- def typeConstructor(implicit ctx: Context): TypeRef = {
+ def typeConstructor(implicit ctx: Context): Type = {
def clsDenot = if (prefix eq cls.owner.thisType) cls.denot else cls.denot.copySymDenotation(info = this)
if (tyconCache == null)
tyconCache =
- if ((cls is PackageClass) || cls.owner.isTerm) TypeRef.withSym(prefix, cls)
- else TypeRef(prefix, cls.name).withDenot(clsDenot)
+ if ((cls is PackageClass) || cls.owner.isTerm) prefix select cls
+ else prefix select (cls.name, clsDenot)
tyconCache
}