diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index e213e1bee01f..d82322fdfa70 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -73,10 +73,10 @@ class Compiler { new ByNameClosures, // Expand arguments to by-name parameters to closures new HoistSuperArgs, // Hoist complex arguments of supercalls to enclosing scope new SpecializeApplyMethods, // Adds specialized methods to FunctionN - new RefChecks) :: // Various checks mostly related to abstract members and overriding - List(new ElimOpaque, // Turn opaque into normal aliases + new RefChecks, // Various checks mostly related to abstract members and overriding new TryCatchPatterns, // Compile cases in try/catch - new PatternMatcher, // Compile pattern matches + new PatternMatcher) :: // Compile pattern matches + List(new ElimOpaque, // Turn opaque into normal aliases new sjs.ExplicitJSClasses, // Make all JS classes explicit (Scala.js only) new ExplicitOuter, // Add accessors to outer classes from nested ones. new ExplicitSelf, // Make references to non-trivial self types explicit as casts diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 7a211631a481..a6a6b2736b1b 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -40,10 +40,8 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase => override def phaseName: String = ExplicitOuter.name - /** List of names of phases that should have finished their processing of all compilation units - * before this phase starts - */ - override def runsAfter: Set[String] = Set(PatternMatcher.name, HoistSuperArgs.name) + override def runsAfter: Set[String] = Set(HoistSuperArgs.name) + override def runsAfterGroupsOf: Set[String] = Set(PatternMatcher.name) override def changesMembers: Boolean = true // the phase adds outer accessors diff --git a/tests/run/i13096.scala b/tests/run/i13096.scala new file mode 100644 index 000000000000..5afb0d0dc1b3 --- /dev/null +++ b/tests/run/i13096.scala @@ -0,0 +1,10 @@ +class C1 { + private class C2 + new C2 match { + case c: C2 => + } +} + +object Test extends App { + new C1 +}