@@ -3888,7 +3888,7 @@ object Parsers {
38883888 stats +++= defOrDcl(in.offset, defAnnotsMods(modifierTokens))
38893889 else
38903890 empty = true
3891- statSepOrEnd(stats, empty, " toplevel definition" )
3891+ statSepOrEnd(stats, noPrevStat = empty, " toplevel definition" )
38923892 do ()
38933893 stats.toList
38943894 }
@@ -3938,7 +3938,7 @@ object Parsers {
39383938 stats += expr1()
39393939 else
39403940 empty = true
3941- statSepOrEnd(stats, empty)
3941+ statSepOrEnd(stats, noPrevStat = empty)
39423942 do ()
39433943 (self, if stats.isEmpty then List (EmptyTree ) else stats.toList)
39443944 }
@@ -3977,7 +3977,7 @@ object Parsers {
39773977 stats ++= checkLegal(defOrDcl(in.offset, Modifiers ()))
39783978 var what = " declaration"
39793979 if inFunReturnType then what += " (possible cause: missing `=` in front of current method body)"
3980- statSepOrEnd(stats, ! dclFound, what)
3980+ statSepOrEnd(stats, noPrevStat = ! dclFound, what)
39813981 do ()
39823982 stats.toList
39833983 }
@@ -4016,7 +4016,7 @@ object Parsers {
40164016 stats +++= localDef(in.offset)
40174017 else
40184018 empty = true
4019- statSepOrEnd(stats, empty, altEnd = CASE )
4019+ statSepOrEnd(stats, noPrevStat = empty, altEnd = CASE )
40204020 do ()
40214021 stats.toList
40224022 }
0 commit comments