diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 9a7fc59b8..661686bdd 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -590,8 +590,12 @@ object Types { /** If this is repeated parameter type, its underlying type, * else the type itself. */ - def underlyingIfRepeated(implicit ctx: Context): Type = - this.translateParameterized(defn.RepeatedParamClass, defn.SeqClass) + def underlyingIfRepeated(implicit ctx: Context): Type = this match { + case rt @ RefinedType(tref: TypeRef, name) if defn.RepeatedParamClasses contains tref.symbol => + RefinedType(defn.SeqClass.typeRef, name, rt.refinedInfo) + case _ => + this + } /** If this is a (possibly aliased, annotated, and/or parameterized) reference to * a class, the class type ref, otherwise NoType. |