File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -3149,17 +3149,12 @@ object Parsers {
31493149 if tpt.isEmpty || in.token == EQUALS then
31503150 endMarkerScope(first) {
31513151 accept(EQUALS )
3152- val rhs0 = subExpr()
3153- val defaultOK = ! tpt.isEmpty && mods.is(Mutable ) && lhs.forall(_.isInstanceOf [Ident ])
3154- def isDefaultSyntax (t : Tree ) = t match {
3155- case Ident (name) => placeholderParams.nonEmpty && name == placeholderParams.head.name
3156- case _ => false
3157- }
3158- if defaultOK && isDefaultSyntax(rhs0) then
3159- placeholderParams = placeholderParams.tail
3160- atSpan(rhs0.span) { Ident (nme.WILDCARD ) }
3161- else
3162- rhs0
3152+ subExpr() match
3153+ case rhs0 @ Ident (name) if placeholderParams.nonEmpty && name == placeholderParams.head.name
3154+ && ! tpt.isEmpty && mods.is(Mutable ) && lhs.forall(_.isInstanceOf [Ident ]) =>
3155+ placeholderParams = placeholderParams.tail
3156+ atSpan(rhs0.span) { Ident (nme.WILDCARD ) }
3157+ case rhs0 => rhs0
31633158 }
31643159 else EmptyTree
31653160 lhs match {
You can’t perform that action at this time.
0 commit comments