|
| 1 | +-- Error: tests/neg/annot-invalid.scala:9:21 --------------------------------------------------------------------------- |
| 2 | +9 | val x1: Int @annot(new Object {}) = 0 // error |
| 3 | + | ^^^^^^^^^^^^^ |
| 4 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 5 | + | Tree: final class $anon() extends Object() {} |
| 6 | + | Type: Object {...} |
| 7 | +-- Error: tests/neg/annot-invalid.scala:10:28 -------------------------------------------------------------------------- |
| 8 | +10 | val x2: Int @annot({class C}) = 0 // error |
| 9 | + | ^^^^^^^ |
| 10 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 11 | + | Tree: class C() extends Object() {} |
| 12 | + | Type: C |
| 13 | +-- Error: tests/neg/annot-invalid.scala:11:26 -------------------------------------------------------------------------- |
| 14 | +11 | val x3: 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:12:26 -------------------------------------------------------------------------- |
| 20 | +12 | val x4: 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: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 |
| 39 | + | ^ |
| 40 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 41 | + | Tree: '{4} |
| 42 | + | 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 |
| 45 | + | ^^^^^^^^^^^^^ |
| 46 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 47 | + | Tree: final class $anon() extends Object() {} |
| 48 | + | Type: Object {...} |
| 49 | +-- Error: tests/neg/annot-invalid.scala:19:16 -------------------------------------------------------------------------- |
| 50 | +19 | @annot({class C}) val y2: Int = 0 // error |
| 51 | + | ^^^^^^^ |
| 52 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 53 | + | Tree: class C() extends Object() {} |
| 54 | + | Type: C |
| 55 | +-- Error: tests/neg/annot-invalid.scala:20:14 -------------------------------------------------------------------------- |
| 56 | +20 | @annot({val y: Int = 2}) val y3: Int = 0 // error |
| 57 | + | ^^^^^^^^^^^^^^ |
| 58 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 59 | + | Tree: val y: Int = 2 |
| 60 | + | Type: (y : Int) |
| 61 | +-- Error: tests/neg/annot-invalid.scala:21:14 -------------------------------------------------------------------------- |
| 62 | +21 | @annot({def f = 2}) val y4: Int = 0 // error |
| 63 | + | ^^^^^^^^^ |
| 64 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 65 | + | Tree: def f: Int = 2 |
| 66 | + | 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 |
| 81 | + | ^ |
| 82 | + | Implementation restriction: expression cannot be used inside an annotation argument. |
| 83 | + | Tree: '{4} |
| 84 | + | Type: (scala.quoted.Quotes) ?=> scala.quoted.Expr[Int] |
0 commit comments