@@ -61,23 +61,6 @@ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase =>
61
61
tp
62
62
}
63
63
64
- /*
65
- tp match {
66
- //create companions for value classes that are not from currently compiled source file
67
- case tp@ClassInfo(_, cls, _, decls, _)
68
- if (ValueClasses.isDerivedValueClass(cls)) &&
69
- !sym.isDefinedInCurrentRun && sym.scalacLinkedClass == NoSymbol =>
70
- val newDecls = decls.cloneScope
71
- val (modul, mcMethod, symMethod) = newCompanion(sym.name.toTermName, sym)
72
- modul.entered
73
- mcMethod.entered
74
- newDecls.enter(symMethod)
75
- tp.derivedClassInfo(decls = newDecls)
76
- case _ => tp
77
- }
78
- }
79
- */
80
-
81
64
override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
82
65
tree match {
83
66
case Select (qual, name) if ! name.is(OuterSelectName ) && tree.symbol.exists =>
@@ -199,11 +182,9 @@ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase =>
199
182
}
200
183
}
201
184
202
- /** Replace type tree `t` of type `T` with `TypeTree(T)`, but make sure all
203
- * binders in `t` are maintained by rewrapping binders around the type tree.
204
- * E.g. if `t` is `C[t @ (>: L <: H)]`, replace with
205
- * `t @ TC[_ >: L <: H]`. The body of the binder `t` is now wrong, but this does
206
- * not matter, as we only need the info of `t`.
185
+ /** Replace type tree `t` of type `T` with `TypeTree(T)`, but record all
186
+ * nested Bind nodes in annotations. These are interpreted in TreeTypeMaps
187
+ * so that bound symbols can be properly copied.
207
188
*/
208
189
private def toTypeTree (tree : Tree )(implicit ctx : Context ) = {
209
190
val binders = collectBinders.apply(Nil , tree)
0 commit comments