@@ -29,7 +29,7 @@ import reporting.trace
2929 *
3030 * e becomes () ?=> e
3131 *
32- * An opimization is applied: If the argument `e` to a cbn parameter is already
32+ * An optimization is applied: If the argument `e` to a cbn parameter is already
3333 * of type `() ?=> T` and is a pure expression, we avoid (2) and (3), i.e. we
3434 * pass `e` directly instead of `() ?=> e.apply()`.
3535 *
@@ -40,12 +40,13 @@ import reporting.trace
4040 *
4141 * Note also that the transformation applies only to types of parameters, not to other
4242 * occurrences of ExprTypes. In particular, embedded occurrences in function types
43- * such as `(=> T) => U` are left as-is. Trying to convert these as well would mean
44- * traversing all the types, and that leads to cyclic reference errors in many cases.
45- * This can cause problems in that we might have sometimes a `() ?=> T` where a
46- * `=> T` is expected. To compensate, there is a new clause in TypeComparer#subArg that
47- * declares `() ?=> T` to be a subtype of `T` for arguments of type applications,
48- * after this phase and up to erasure.
43+ * such as `(=> T) => U` are left as-is here (they are eliminated in erasure).
44+ * Trying to convert these as well would mean traversing all the types, and that
45+ * leads to cyclic reference errors in many cases. This can cause problems in that
46+ * we might have sometimes a `() ?=> T` where a `=> T` is expected. To compensate,
47+ * there is a new clause in TypeComparer#subArg that declares `() ?=> T` to be a
48+ * subtype of `=> T` for arguments of type applications at any point after this phase
49+ * and up to erasure.
4950 */
5051class ElimByName extends MiniPhase , InfoTransformer :
5152 thisPhase =>
0 commit comments