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 @@ -1897,6 +1897,7 @@ object Parsers {
1897
1897
if (in.token == THIS ) {
1898
1898
in.nextToken()
1899
1899
val vparamss = paramClauses(nme.CONSTRUCTOR )
1900
+ if (in.isScala2Mode) newLineOptWhenFollowedBy(LBRACE )
1900
1901
val rhs = {
1901
1902
if (! (in.token == LBRACE && scala2ProcedureSyntax(" " ))) accept(EQUALS )
1902
1903
atPos(in.offset) { constrExpr() }
@@ -1908,6 +1909,7 @@ object Parsers {
1908
1909
val tparams = typeParamClauseOpt(ParamOwner .Def )
1909
1910
val vparamss = paramClauses(name)
1910
1911
var tpt = fromWithinReturnType(typedOpt())
1912
+ if (in.isScala2Mode) newLineOptWhenFollowedBy(LBRACE )
1911
1913
val rhs =
1912
1914
if (in.token == EQUALS ) {
1913
1915
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