diff options
Diffstat (limited to 'src/dotty/tools/dotc/ast/Desugar.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index e6c43acbb..f8f5972d1 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -258,7 +258,9 @@ object desugar { else (vparamss :\ classTypeRef) ((vparams, restpe) => Function(vparams map (_.tpt), restpe)) val applyMeths = if (mods is Abstract) Nil - else DefDef(synthetic, nme.apply, tparams, vparamss, TypeTree(), creatorExpr) :: Nil + else DefDef( + synthetic | (constr1.mods.flags & DefaultParameterized), nme.apply, + tparams, vparamss, TypeTree(), creatorExpr) :: Nil val unapplyMeth = { val unapplyParam = makeSyntheticParameter(tpt = classTypeRef) DefDef(synthetic, nme.unapply, tparams, (unapplyParam :: Nil) :: Nil, |