File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1947,6 +1947,7 @@ object Parsers {
1947
1947
if (in.token == THIS ) {
1948
1948
in.nextToken()
1949
1949
val vparamss = paramClauses(nme.CONSTRUCTOR )
1950
+ if (in.isScala2Mode) newLineOptWhenFollowedBy(LBRACE )
1950
1951
val rhs = {
1951
1952
if (! (in.token == LBRACE && scala2ProcedureSyntax(" " ))) accept(EQUALS )
1952
1953
atPos(in.offset) { constrExpr() }
@@ -1958,6 +1959,7 @@ object Parsers {
1958
1959
val tparams = typeParamClauseOpt(ParamOwner .Def )
1959
1960
val vparamss = paramClauses(name)
1960
1961
var tpt = fromWithinReturnType(typedOpt())
1962
+ if (in.isScala2Mode) newLineOptWhenFollowedBy(LBRACE )
1961
1963
val rhs =
1962
1964
if (in.token == EQUALS ) {
1963
1965
in.nextToken()
Original file line number Diff line number Diff line change
1
+ object Test {
2
+
3
+ def foo (x : Int )
4
+ {
5
+ x
6
+ }
7
+
8
+ }
You can’t perform that action at this time.
0 commit comments