From f1088e3415ed6563238064bbb480c5712db621f7 Mon Sep 17 00:00:00 2001 From: odersky Date: Tue, 27 May 2025 11:20:50 +0200 Subject: [PATCH] Hide constructor proxies at PostTyper Constructor proxies should all have been expanded at Typer. No need to keep them past PostTyper. This is a trial balloon to see whether we can do something similar for capture variable proxies. --- compiler/src/dotty/tools/dotc/transform/PostTyper.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index 6480ae7fdd05..f970e75177e3 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -704,6 +704,7 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase => case _ => if parents1 ne info.parents then info.derivedClassInfo(declaredParents = parents1) else tp + case _ if sym.is(ConstructorProxy) => NoType case _ => tp private def argTypeOfCaseClassThatNeedsAbstractFunction1(sym: Symbol)(using Context): Option[List[Type]] =