-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discard the full annotation tree if a sub-tree is invalid
- Loading branch information
Showing
2 changed files
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
-- Error: tests/neg/annot-invalid.scala:4:21 --------------------------------------------------------------------------- | ||
4 | val x1: Int @annot(new Object {}) = 0 // error | ||
| ^^^^^^^^^^^^^ | ||
| Implementation restriction: this tree cannot be used in an annotation. | ||
| Implementation restriction: expression cannot be used inside an annotation argument. | ||
| Tree: final class $anon() extends Object() {} | ||
| Type: Object {...} | ||
-- Error: tests/neg/annot-invalid.scala:5:28 --------------------------------------------------------------------------- | ||
5 | val x2: Int @annot({class C}) = 0 // error | ||
| ^^^^^^^ | ||
| Implementation restriction: this tree cannot be used in an annotation. | ||
| Implementation restriction: expression cannot be used inside an annotation argument. | ||
| Tree: class C() extends Object() {} | ||
| Type: C | ||
-- Error: tests/neg/annot-invalid.scala:7:9 ---------------------------------------------------------------------------- | ||
7 | @annot(new Object {}) val y1: Int = 0 // error | ||
| ^^^^^^^^^^^^^ | ||
| Implementation restriction: this tree cannot be used in an annotation. | ||
| Implementation restriction: expression cannot be used inside an annotation argument. | ||
| Tree: final class $anon() extends Object() {} | ||
| Type: Object {...} | ||
-- Error: tests/neg/annot-invalid.scala:8:16 --------------------------------------------------------------------------- | ||
8 | @annot({class C}) val y2: Int = 0 // error | ||
| ^^^^^^^ | ||
| Implementation restriction: this tree cannot be used in an annotation. | ||
| Implementation restriction: expression cannot be used inside an annotation argument. | ||
| Tree: class C() extends Object() {} | ||
| Type: C |