diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/internal/Types.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/AddInterfaces.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 38f51b1459..f37509af39 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -1900,7 +1900,7 @@ A type's typeSymbol should never be inspected directly. // note: does not go through typeRef. There's no need to because // neither `pre` nor `sym` changes. And there's a performance // advantage to call TypeRef directly. - override def typeConstructor = TypeRef(pre, sym, Nil) + override def typeConstructor = if (args.isEmpty) this else TypeRef(pre, sym, Nil) // A reference (in a Scala program) to a type that has type // parameters, but where the reference does not include type diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala index 4e8e678dc8..c59a819b02 100644 --- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala +++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala @@ -148,8 +148,8 @@ abstract class AddInterfaces extends InfoTransform { */ def mixinToImplClass(tp: Type): Type = erasure(sym, tp match { //@MATN: no normalize needed (comes after erasure) - case TypeRef(pre, sym, args) if sym.needsImplClass => - typeRef(pre, implClass(sym), args) + case TypeRef(pre, sym, _) if sym.needsImplClass => + typeRef(pre, implClass(sym), Nil) case _ => tp } |