File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ object desugar {
406406 def paramssNoRHS = mapParamss(meth.paramss)(identity) {
407407 vparam =>
408408 if vparam.rhs.isEmpty then vparam
409- else cpy.ValDef (vparam)(rhs = EmptyTree ).withMods(vparam.mods | HasDefault )
409+ else cpy.ValDef (vparam)(/* rhs = EmptyTree*/ ).withMods(vparam.mods | HasDefault )
410410 }
411411
412412 def getterParamss (n : Int ): List [ParamClause ] =
Original file line number Diff line number Diff line change @@ -229,7 +229,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
229229 Checking .checkValidOperator(sym)
230230 sym.transformAnnotations(transformAnnot)
231231 sym.defTree = tree
232- tree
232+ tree match
233+ case v : ValDef if v.mods.is(HasDefault ) => cpy.ValDef (v)(rhs = EmptyTree ).asInstanceOf [tree.type ]
234+ case _ => tree
233235 }
234236
235237 private def registerIfUnrolledParam (sym : Symbol )(using Context ): Unit =
You can’t perform that action at this time.
0 commit comments