@@ -218,7 +218,7 @@ self =>
218
218
219
219
override def blockExpr (): Tree = skipBraces(EmptyTree )
220
220
221
- override def templateBody (isPre : Boolean ) = skipBraces((noSelfType, EmptyTree .asList))
221
+ override def templateBody () = skipBraces((noSelfType, EmptyTree .asList))
222
222
}
223
223
224
224
class UnitParser (override val unit : global.CompilationUnit , patches : List [BracePatch ]) extends SourceFileParser (unit.source) { uself =>
@@ -3322,7 +3322,7 @@ self =>
3322
3322
if (in.token == LBRACE ) {
3323
3323
val braceOffset = in.offset
3324
3324
// @S: pre template body cannot stub like post body can!
3325
- val (self, body) = templateBody(isPre = true )
3325
+ val (self, body) = templateBody()
3326
3326
if (in.token == WITH && (self eq noSelfType)) {
3327
3327
val advice =
3328
3328
if (currentRun.isScala3) " use trait parameters instead."
@@ -3404,16 +3404,15 @@ self =>
3404
3404
/** {{{
3405
3405
* TemplateBody ::= [nl] `{` TemplateStatSeq `}`
3406
3406
* }}}
3407
- * @param isPre specifies whether in early initializer (true) or not (false)
3408
3407
*/
3409
- def templateBody (isPre : Boolean ) = inBraces(templateStatSeq(isPre )) match {
3408
+ def templateBody () = inBraces(templateStatSeq()) match {
3410
3409
case (selfTypeVal, Nil ) => (selfTypeVal, EmptyTree .asList)
3411
3410
case result => result
3412
3411
}
3413
3412
def templateBodyOpt (parenMeansSyntaxError : Boolean ): (ValDef , List [Tree ]) = {
3414
3413
newLineOptWhenFollowedBy(LBRACE )
3415
3414
if (in.token == LBRACE ) {
3416
- templateBody(isPre = false )
3415
+ templateBody()
3417
3416
} else {
3418
3417
if (in.token == LPAREN ) {
3419
3418
if (parenMeansSyntaxError) syntaxError(s " traits or objects may not have parameters " , skipIt = true )
@@ -3476,9 +3475,8 @@ self =>
3476
3475
/** {{{
3477
3476
* TemplateStatSeq ::= [id [`:` Type] `=>`] TemplateStats
3478
3477
* }}}
3479
- * @param isPre specifies whether in early initializer (true) or not (false)
3480
3478
*/
3481
- def templateStatSeq (isPre : Boolean ): (ValDef , List [Tree ]) = {
3479
+ def templateStatSeq (): (ValDef , List [Tree ]) = {
3482
3480
var self : ValDef = noSelfType
3483
3481
var firstOpt : Option [Tree ] = None
3484
3482
if (isExprIntro) checkNoEscapingPlaceholders {
0 commit comments