@@ -61,23 +61,6 @@ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase =>
6161 tp
6262 }
6363
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-
8164 override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
8265 tree match {
8366 case Select (qual, name) if ! name.is(OuterSelectName ) && tree.symbol.exists =>
@@ -199,11 +182,9 @@ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase =>
199182 }
200183 }
201184
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.
207188 */
208189 private def toTypeTree (tree : Tree )(implicit ctx : Context ) = {
209190 val binders = collectBinders.apply(Nil , tree)
0 commit comments