File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,8 @@ class FirstTransform extends MiniPhaseTransform with InfoTransformer with Annota
9999 def reorder (stats : List [Tree ], revPrefix : List [Tree ]): List [Tree ] = stats match {
100100 case (stat : TypeDef ) :: stats1 if stat.symbol.isClass =>
101101 if (stat.symbol is Flags .Module ) {
102- def pushOnTop (xs : List [Tree ], ys : List [Tree ]): List [Tree ] = xs match {
103- case x :: xs1 => pushOnTop(xs1, x :: ys)
104- case Nil => ys
105- }
102+ def pushOnTop (xs : List [Tree ], ys : List [Tree ]): List [Tree ] =
103+ (ys /: xs)((ys, x) => x :: ys)
106104 moduleClassDefs += (stat.name -> stat)
107105 singleClassDefs -= stat.name.stripModuleClassSuffix
108106 val stats1r = reorder(stats1, Nil )
You can’t perform that action at this time.
0 commit comments