From 04de50018188c4602ea3af5298715544f6f0faa1 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 3 Oct 2011 22:40:58 +0000 Subject: [PATCH] 327141 --- tests/bugs1612/pr327141/AspectWithConstant.aj | 17 +++++++++++++++++ .../systemtest/ajc1612/Ajc1612Tests.java | 4 ++++ .../org/aspectj/systemtest/ajc1612/ajc1612.xml | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/bugs1612/pr327141/AspectWithConstant.aj diff --git a/tests/bugs1612/pr327141/AspectWithConstant.aj b/tests/bugs1612/pr327141/AspectWithConstant.aj new file mode 100644 index 000000000..1dea5b8f4 --- /dev/null +++ b/tests/bugs1612/pr327141/AspectWithConstant.aj @@ -0,0 +1,17 @@ +import java.lang.annotation.*; + +public aspect AspectWithConstant { + declare @field : * AspectWithConstant.MAX* : @Loggable; + public static final int MAX = 9; + public static final float MAXf = 9.0f; + public static final double MAXd = 9.0d; + public static final long MAXl = 9L; + public static final Class MAXc = String.class; + @Retention(RetentionPolicy.RUNTIME) + @interface Loggable { } + + public static void main(String []argv) throws Exception { + System.out.println("MAX="+MAX); +System.out.println(AspectWithConstant.class.getDeclaredField("MAX").getAnnotation(Loggable.class)); + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java index 5b04210f0..eb5c5b36b 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java @@ -36,6 +36,10 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // runTest("itd split compilation"); // } + public void testClassCast_327141() { + runTest("classcast"); + } + public void testXmlDefs() { runTest("xml defined advice"); } diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml index fd57e555d..c02a99886 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml +++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml @@ -2,6 +2,15 @@ + + + + + + + + + -- 2.39.5