diff options
Diffstat (limited to 'tests/errors/Const.java')
-rw-r--r-- | tests/errors/Const.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/errors/Const.java b/tests/errors/Const.java new file mode 100644 index 000000000..103e4972b --- /dev/null +++ b/tests/errors/Const.java @@ -0,0 +1,21 @@ +import org.aspectj.testing.*; + +public class Const { + public static void main(String[] args) { + new Const().realMain(args); + } + + public void realMain(String[] args) { + int const = 2; + int i = const * 2; + Tester.check(false, "shouldn't have compiled"); + } + + public static void testme1() { + int i = const + 1; + } + + public static void testme2() { + int j = Const.const + 1; + } +} |