@@ -470,19 +470,11 @@ class Global(var currentSettings: Settings, reporter0: Reporter)
470470 val global : Global .this .type = Global .this
471471 } with Analyzer
472472
473- // phaseName = "patmat"
474- object patmat extends {
475- val global : Global .this .type = Global .this
476- val runsAfter = List (" typer" )
477- val runsRightAfter = None
478- // patmat doesn't need to be right after typer, as long as we run before superaccessors
479- // (sbt does need to run right after typer, so don't conflict)
480- } with PatternMatching
481-
482473 // phaseName = "superaccessors"
483474 object superAccessors extends {
484475 val global : Global .this .type = Global .this
485- val runsAfter = List (" patmat" )
476+ val runsAfter = List (" typer" )
477+ // sbt needs to run right after typer, so don't conflict
486478 val runsRightAfter = None
487479 } with SuperAccessors
488480
@@ -507,10 +499,20 @@ class Global(var currentSettings: Settings, reporter0: Reporter)
507499 val runsRightAfter = None
508500 } with RefChecks
509501
502+ // phaseName = "patmat"
503+ object patmat extends {
504+ val global : Global .this .type = Global .this
505+ // patmat does not need to run before the superaccessors phase, because
506+ // patmat never emits `this.x` where `x` is a ParamAccessor.
507+ // (However, patmat does need to run before outer accessors generation).
508+ val runsAfter = List (" refchecks" )
509+ val runsRightAfter = None
510+ } with PatternMatching
511+
510512 // phaseName = "uncurry"
511513 override object uncurry extends {
512514 val global : Global .this .type = Global .this
513- val runsAfter = List (" refchecks " )
515+ val runsAfter = List (" patmat " )
514516 val runsRightAfter = None
515517 } with UnCurry
516518
@@ -653,8 +655,8 @@ class Global(var currentSettings: Settings, reporter0: Reporter)
653655 analyzer.namerFactory -> " resolve names, attach symbols to named trees" ,
654656 analyzer.packageObjects -> " load package objects" ,
655657 analyzer.typerFactory -> " the meat and potatoes: type the trees" ,
656- patmat -> " translate match expressions" ,
657658 superAccessors -> " add super accessors in traits and nested classes" ,
659+ patmat -> " translate match expressions" ,
658660 extensionMethods -> " add extension methods for inline classes" ,
659661 pickler -> " serialize symbol tables" ,
660662 refChecks -> " reference/override checking, translate nested objects" ,
0 commit comments