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
99
99
def reorder (stats : List [Tree ], revPrefix : List [Tree ]): List [Tree ] = stats match {
100
100
case (stat : TypeDef ) :: stats1 if stat.symbol.isClass =>
101
101
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)
106
104
moduleClassDefs += (stat.name -> stat)
107
105
singleClassDefs -= stat.name.stripModuleClassSuffix
108
106
val stats1r = reorder(stats1, Nil )
You can’t perform that action at this time.
0 commit comments