aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/UnPickler.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/UnPickler.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index ba2845bd1..279e287ea 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -91,7 +91,11 @@ object UnPickler {
}
def ensureConstructor(cls: ClassSymbol, scope: Scope)(implicit ctx: Context) =
- if (scope.lookup(nme.CONSTRUCTOR) == NoSymbol) cls.enter(ctx.newDefaultConstructor(cls), scope)
+ if (scope.lookup(nme.CONSTRUCTOR) == NoSymbol) {
+ val constr = ctx.newDefaultConstructor(cls)
+ addConstructorTypeParams(constr)
+ cls.enter(constr, scope)
+ }
def setClassInfo(denot: ClassDenotation, info: Type, selfInfo: Type = NoType)(implicit ctx: Context): Unit = {
val cls = denot.classSymbol