aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/BadNewArrayExprs.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/BadNewArrayExprs.java')
-rw-r--r--tests/errors/BadNewArrayExprs.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/errors/BadNewArrayExprs.java b/tests/errors/BadNewArrayExprs.java
new file mode 100644
index 000000000..138b89ca6
--- /dev/null
+++ b/tests/errors/BadNewArrayExprs.java
@@ -0,0 +1,51 @@
+class BadNewArrayExprs {
+ static Object o;
+ public static void main(String[] args) {
+ o = new Test[][3];
+ o = new Test[][];
+ o = new Test[];
+ o = new Test[3] { };
+ }
+}
+/*
+
+abstract class C {
+}
+class D extends C {
+}
+
+class M {}
+
+class X {
+ abstract void foo();
+}
+
+class Y extends X {
+
+ void foo(M m) {
+ new C().m(m);
+ }
+
+ static aspect XXX {
+ abstract private void C.m(M m);
+
+ private void D.m(M m) {
+ System.out.println("I'm in XXX " + m);
+ }
+ }
+}
+
+class Z extends X {
+ void foo(M m) {
+ new C().m(m);
+ }
+
+ static aspect XXX {
+ abstract private void C.m(M m);
+
+ private void D.m(M m) {
+ System.out.println("I'm in YYY " + m);
+ }
+ }
+}
+*/