|
22 | 22 | | Implementation restriction: expression cannot be used inside an annotation argument. |
23 | 23 | | Tree: def f: Int = 2 |
24 | 24 | | Type: (f : => Int) |
25 | | --- Error: tests/neg/annot-invalid.scala:13:30 -------------------------------------------------------------------------- |
26 | | -13 | val x5: Int @annot((x: Int) => x) = 0 // error |
27 | | - | ^^^^^^^^^^^^^ |
28 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
29 | | - | Tree: closure($anonfun) |
30 | | - | Type: Int => Int |
31 | | --- Error: tests/neg/annot-invalid.scala:14:21 -------------------------------------------------------------------------- |
32 | | -14 | val x6: Int @annot(O.g) = 0 // error |
33 | | - | ^^^ |
34 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
35 | | - | Tree: closure($anonfun) |
36 | | - | Type: Int => Int |
37 | | --- Error: tests/neg/annot-invalid.scala:16:25 -------------------------------------------------------------------------- |
38 | | -16 | val x7: Int @annot('{4}) = 0 // error |
| 25 | +-- Error: tests/neg/annot-invalid.scala:14:25 -------------------------------------------------------------------------- |
| 26 | +14 | val x5: Int @annot('{4}) = 0 // error |
39 | 27 | | ^ |
40 | 28 | | Implementation restriction: expression cannot be used inside an annotation argument. |
41 | 29 | | Tree: '{4} |
42 | 30 | | Type: (scala.quoted.Quotes) ?=> scala.quoted.Expr[Int] |
43 | | --- Error: tests/neg/annot-invalid.scala:18:9 --------------------------------------------------------------------------- |
44 | | -18 | @annot(new Object {}) val y1: Int = 0 // error |
| 31 | +-- Error: tests/neg/annot-invalid.scala:16:9 --------------------------------------------------------------------------- |
| 32 | +16 | @annot(new Object {}) val y1: Int = 0 // error |
45 | 33 | | ^^^^^^^^^^^^^ |
46 | 34 | | Implementation restriction: expression cannot be used inside an annotation argument. |
47 | 35 | | Tree: final class $anon() extends Object() {} |
48 | 36 | | Type: Object {...} |
49 | | --- Error: tests/neg/annot-invalid.scala:19:16 -------------------------------------------------------------------------- |
50 | | -19 | @annot({class C}) val y2: Int = 0 // error |
| 37 | +-- Error: tests/neg/annot-invalid.scala:17:16 -------------------------------------------------------------------------- |
| 38 | +17 | @annot({class C}) val y2: Int = 0 // error |
51 | 39 | | ^^^^^^^ |
52 | 40 | | Implementation restriction: expression cannot be used inside an annotation argument. |
53 | 41 | | Tree: class C() extends Object() {} |
54 | 42 | | Type: C |
55 | | --- Error: tests/neg/annot-invalid.scala:20:14 -------------------------------------------------------------------------- |
56 | | -20 | @annot({val y: Int = 2}) val y3: Int = 0 // error |
| 43 | +-- Error: tests/neg/annot-invalid.scala:18:14 -------------------------------------------------------------------------- |
| 44 | +18 | @annot({val y: Int = 2}) val y3: Int = 0 // error |
57 | 45 | | ^^^^^^^^^^^^^^ |
58 | 46 | | Implementation restriction: expression cannot be used inside an annotation argument. |
59 | 47 | | Tree: val y: Int = 2 |
60 | 48 | | Type: (y : Int) |
61 | | --- Error: tests/neg/annot-invalid.scala:21:14 -------------------------------------------------------------------------- |
62 | | -21 | @annot({def f = 2}) val y4: Int = 0 // error |
| 49 | +-- Error: tests/neg/annot-invalid.scala:19:14 -------------------------------------------------------------------------- |
| 50 | +19 | @annot({def f = 2}) val y4: Int = 0 // error |
63 | 51 | | ^^^^^^^^^ |
64 | 52 | | Implementation restriction: expression cannot be used inside an annotation argument. |
65 | 53 | | Tree: def f: Int = 2 |
66 | 54 | | Type: (f : => Int) |
67 | | --- Error: tests/neg/annot-invalid.scala:22:18 -------------------------------------------------------------------------- |
68 | | -22 | @annot((x: Int) => x) val y5: Int = 0 // error |
69 | | - | ^^^^^^^^^^^^^ |
70 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
71 | | - | Tree: closure($anonfun) |
72 | | - | Type: Int => Int |
73 | | --- Error: tests/neg/annot-invalid.scala:23:9 --------------------------------------------------------------------------- |
74 | | -23 | @annot(O.g) val y6: Int = 0 // error |
75 | | - | ^^^ |
76 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
77 | | - | Tree: closure($anonfun) |
78 | | - | Type: Int => Int |
79 | | --- Error: tests/neg/annot-invalid.scala:25:13 -------------------------------------------------------------------------- |
80 | | -25 | @annot('{4}) val y7: Int = 0 // error |
| 55 | +-- Error: tests/neg/annot-invalid.scala:21:13 -------------------------------------------------------------------------- |
| 56 | +21 | @annot('{4}) val y5: Int = 0 // error |
81 | 57 | | ^ |
82 | 58 | | Implementation restriction: expression cannot be used inside an annotation argument. |
83 | 59 | | Tree: '{4} |
|
0 commit comments