diff options
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeOps.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index 11e826464..8d05a4324 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -37,7 +37,7 @@ trait TypeOps { this: Context => // // But in Scala 2.x, its type is Int, which is the dealiased version // of xs.T. With the logic below, we get the same outcome as for 2.x. - if ((tp1 ne tp) && (sym is (TypeParam, butNot = Deferred))) tp1.dealias + if ((tp1 ne tp) && (sym is (TypeParam, butNot = Deferred))) tp1.dealias // todo: why not TypeArgument? else tp1 } case ThisType(thiscls) => diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index bcc447f8a..83b8cb5dc 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -243,6 +243,8 @@ object Types { case tp: TypeRef => val sym = tp.symbol if (sym.isClass) sym else tp.underlying.classSymbol + case tp: TermRef => + NoSymbol case tp: TypeProxy => tp.underlying.classSymbol case AndType(l, r) => @@ -679,7 +681,7 @@ object Types { * else the type itself. */ def underlyingIfRepeated(implicit ctx: Context): Type = - if (isRepeatedParam) dealias else this + translateParameterized(defn.RepeatedParamClass, defn.SeqClass) // ----- Access to parts -------------------------------------------- |