Skip to content

Commit 5d5880e

Browse files
author
Som Snytt
committed
Remove vparamss unused for constructors
1 parent c832977 commit 5d5880e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/compiler/scala/tools/nsc/ast/parser/Parsers.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,14 +3019,14 @@ self =>
30193019
migrationWarning(in.lastOffset, msg, since = "2.13.2", actions = runReporting.codeAction("replace procedure syntax", o2p(in.lastOffset), " =", msg))
30203020
}
30213021
atPos(start, in.skipToken()) {
3022-
val vparamss = paramClauses(nme.CONSTRUCTOR, classContextBounds map (_.duplicate), ofCaseClass = false)
3022+
val vparamss = paramClauses(nme.CONSTRUCTOR, classContextBounds.map(_.duplicate), ofCaseClass = false)
30233023
newLineOptWhenFollowedBy(LBRACE)
30243024
val rhs =
30253025
if (in.token == LBRACE) {
3026-
missingEquals(); atPos(in.offset) { constrBlock(vparamss) }
3026+
missingEquals(); atPos(in.offset) { constrBlock() }
30273027
}
30283028
else {
3029-
accept(EQUALS) ; atPos(in.offset) { constrExpr(vparamss) }
3029+
accept(EQUALS) ; atPos(in.offset) { constrExpr() }
30303030
}
30313031
DefDef(mods, nme.CONSTRUCTOR, List(), vparamss, TypeTree(), rhs)
30323032
}
@@ -3105,15 +3105,15 @@ self =>
31053105
* | ConstrBlock
31063106
* }}}
31073107
*/
3108-
def constrExpr(vparamss: List[List[ValDef]]): Tree =
3109-
if (in.token == LBRACE) constrBlock(vparamss)
3110-
else Block(selfInvocation(vparamss) :: Nil, literalUnit)
3108+
def constrExpr(): Tree =
3109+
if (in.token == LBRACE) constrBlock()
3110+
else Block(selfInvocation() :: Nil, literalUnit)
31113111

31123112
/** {{{
31133113
* SelfInvocation ::= this ArgumentExprs {ArgumentExprs}
31143114
* }}}
31153115
*/
3116-
def selfInvocation(vparamss: List[List[ValDef]]): Tree =
3116+
def selfInvocation(): Tree =
31173117
atPos(accept(THIS)) {
31183118
newLineOptWhenFollowedBy(LBRACE)
31193119
var t = Apply(Ident(nme.CONSTRUCTOR), argumentExprs())
@@ -3129,9 +3129,9 @@ self =>
31293129
* ConstrBlock ::= `{` SelfInvocation {semi BlockStat} `}`
31303130
* }}}
31313131
*/
3132-
def constrBlock(vparamss: List[List[ValDef]]): Tree =
3132+
def constrBlock(): Tree =
31333133
atPos(in.skipToken()) {
3134-
val stats = selfInvocation(vparamss) :: {
3134+
val stats = selfInvocation() :: {
31353135
if (isStatSep) { in.nextToken(); blockStatSeq() }
31363136
else Nil
31373137
}

0 commit comments

Comments
 (0)