@@ -29,7 +29,7 @@ import reporting.trace
29
29
*
30
30
* e becomes () ?=> e
31
31
*
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
33
33
* of type `() ?=> T` and is a pure expression, we avoid (2) and (3), i.e. we
34
34
* pass `e` directly instead of `() ?=> e.apply()`.
35
35
*
@@ -40,12 +40,13 @@ import reporting.trace
40
40
*
41
41
* Note also that the transformation applies only to types of parameters, not to other
42
42
* 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.
49
50
*/
50
51
class ElimByName extends MiniPhase , InfoTransformer :
51
52
thisPhase =>
0 commit comments