Skip to content

Commit 56b1951

Browse files
committed
Add comment to Compiler.scala about behaviour of Constructors
1 parent a33eece commit 56b1951

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Compiler {
7171
new LinkScala2ImplClasses,
7272
new NonLocalReturns,
7373
new CapturedVars, // capturedVars has a transformUnit: no phases should introduce local mutable vars here
74-
new Constructors,
74+
new Constructors, // constructors changes decls in transformTemplate, no InfoTransformers should be added after it
7575
new FunctionalInterfaces,
7676
new GetClass), // getClass transformation should be applied to specialized methods
7777
List(new LambdaLift, // in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here

src/dotty/tools/dotc/transform/Constructors.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ class Constructors extends MiniPhaseTransform with SymTransformer { thisTransfor
253253
cls.copy(
254254
info = clsInfo.derivedClassInfo(
255255
decls = clsInfo.decls.filteredScope(!dropped.contains(_))))
256+
257+
// TODO: this happens to work only because Constructors is the last phase in group
256258
}
257259

258260
val (superCalls, followConstrStats) = constrStats.toList match {

0 commit comments

Comments
 (0)