diff options
Diffstat (limited to 'tests/features160/annotationValueMatching/Broken1.java')
-rw-r--r-- | tests/features160/annotationValueMatching/Broken1.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/features160/annotationValueMatching/Broken1.java b/tests/features160/annotationValueMatching/Broken1.java new file mode 100644 index 000000000..ab0877c74 --- /dev/null +++ b/tests/features160/annotationValueMatching/Broken1.java @@ -0,0 +1,29 @@ +enum Color { RED, GREEN, AMBER } + +@interface TrafficLight { + Color value() default Color.RED; +} + +public class Broken1 { + public static void main(String[] args) { + + } +} + +class Marked { + + public void a() {} + + @TrafficLight + public void b() {} + + @TrafficLight(Color.RED) + public void c() {} + + @TrafficLight(Color.GREEN) + public void d() {} +} + +aspect X { + pointcut p1(): execution(@TrafficLight(a) * *(..)); // value of just 'a' doesn't mean anything - only enums supported right now, let's say 'invalid annotation value' +} |