File tree 2 files changed +17
-4
lines changed
src/dotty/tools/dotc/transform
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,8 @@ object ElimByName {
40
40
* This makes the argument compatible with a parameter type of () => T, which will be the
41
41
* formal parameter type at erasure. But to be -Ycheckable until then, any argument
42
42
* ARG rewritten by the rules above is again wrapped in an application ARG.apply(),
43
- * labelled with an `ByNameParam` attachment.
44
- *
45
- * Erasure will later strip wrapped `.apply()` calls with ByNameParam attachments.
46
- *
43
+ * labelled with a `ByNameParam` attachment. Erasure will later strip wrapped
44
+ * `.apply()` calls with ByNameParam attachments.
47
45
*/
48
46
class ElimByName extends MiniPhaseTransform with InfoTransformer { thisTransformer =>
49
47
import ast .tpd ._
Original file line number Diff line number Diff line change
1
+ object Test {
2
+
3
+ type LF = (=> Int ) => Int
4
+
5
+ def f (x : => Int ) = x * x
6
+
7
+ val x : LF = f
8
+
9
+ def g = 3
10
+
11
+ f(11 )
12
+ x(g)
13
+ x(11 )
14
+
15
+ }
You can’t perform that action at this time.
0 commit comments