|
10 | 10 | | Implementation restriction: expression cannot be used inside an annotation argument. |
11 | 11 | | Tree: class C() extends Object() {} |
12 | 12 | | Type: C |
13 | | --- Error: tests/neg/annot-invalid.scala:7:9 ---------------------------------------------------------------------------- |
14 | | -7 | @annot(new Object {}) val y1: Int = 0 // error |
15 | | - | ^^^^^^^^^^^^^ |
16 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
17 | | - | Tree: final class $anon() extends Object() {} |
18 | | - | Type: Object {...} |
19 | | --- Error: tests/neg/annot-invalid.scala:8:16 --------------------------------------------------------------------------- |
20 | | -8 | @annot({class C}) val y2: Int = 0 // error |
21 | | - | ^^^^^^^ |
22 | | - | Implementation restriction: expression cannot be used inside an annotation argument. |
23 | | - | Tree: class C() extends Object() {} |
24 | | - | Type: C |
| 13 | +-- Error: tests/neg/annot-invalid.scala:6:27 --------------------------------------------------------------------------- |
| 14 | +6 | val x16: Int @annot({val y: Int = 2}) = 0 // error |
| 15 | + | ^^^^^^^^^^^^^^ |
| 16 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 17 | + | Tree: val y: Int = 2 |
| 18 | + | Type: (y : Int) |
| 19 | +-- Error: tests/neg/annot-invalid.scala:7:27 --------------------------------------------------------------------------- |
| 20 | +7 | val x17: Int @annot({def f = 2}) = 0 // error |
| 21 | + | ^^^^^^^^^ |
| 22 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 23 | + | Tree: def f: Int = 2 |
| 24 | + | Type: (f : => Int) |
| 25 | +-- Error: tests/neg/annot-invalid.scala:8:31 --------------------------------------------------------------------------- |
| 26 | +8 | val x18: 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 | +-- [E006] Not Found Error: tests/neg/annot-invalid.scala:9:22 ---------------------------------------------------------- |
| 32 | +9 | val x19: Int @annot(O.g) = 0 // error |
| 33 | + | ^ |
| 34 | + | Not found: O |
| 35 | + | |
| 36 | + | longer explanation available when compiling with `-explain` |
| 37 | +-- Error: tests/neg/annot-invalid.scala:11:9 --------------------------------------------------------------------------- |
| 38 | +11 | @annot(new Object {}) val y1: Int = 0 // error |
| 39 | + | ^^^^^^^^^^^^^ |
| 40 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 41 | + | Tree: final class $anon() extends Object() {} |
| 42 | + | Type: Object {...} |
| 43 | +-- Error: tests/neg/annot-invalid.scala:12:16 -------------------------------------------------------------------------- |
| 44 | +12 | @annot({class C}) val y2: Int = 0 // error |
| 45 | + | ^^^^^^^ |
| 46 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 47 | + | Tree: class C() extends Object() {} |
| 48 | + | Type: C |
| 49 | +-- Error: tests/neg/annot-invalid.scala:13:14 -------------------------------------------------------------------------- |
| 50 | +13 | @annot({val y: Int = 2}) val y16: Int = 0 // error |
| 51 | + | ^^^^^^^^^^^^^^ |
| 52 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 53 | + | Tree: val y: Int = 2 |
| 54 | + | Type: (y : Int) |
| 55 | +-- Error: tests/neg/annot-invalid.scala:14:14 -------------------------------------------------------------------------- |
| 56 | +14 | @annot({def f = 2}) val y17: Int = 0 // error |
| 57 | + | ^^^^^^^^^ |
| 58 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 59 | + | Tree: def f: Int = 2 |
| 60 | + | Type: (f : => Int) |
| 61 | +-- Error: tests/neg/annot-invalid.scala:15:18 -------------------------------------------------------------------------- |
| 62 | +15 | @annot((x: Int) => x) val y18: Int = 0 // error |
| 63 | + | ^^^^^^^^^^^^^ |
| 64 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 65 | + | Tree: closure($anonfun) |
| 66 | + | Type: Int => Int |
| 67 | +-- [E006] Not Found Error: tests/neg/annot-invalid.scala:16:9 ---------------------------------------------------------- |
| 68 | +16 | @annot(O.g) val y19: Int = 0 // error |
| 69 | + | ^ |
| 70 | + | Not found: O |
| 71 | + | |
| 72 | + | longer explanation available when compiling with `-explain` |
0 commit comments