summaryrefslogtreecommitdiffstats
path: root/tests/errors/BadExtension.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/errors/BadExtension.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/errors/BadExtension.java')
-rw-r--r--tests/errors/BadExtension.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/errors/BadExtension.java b/tests/errors/BadExtension.java
new file mode 100644
index 000000000..32bfe8e9c
--- /dev/null
+++ b/tests/errors/BadExtension.java
@@ -0,0 +1,38 @@
+public class BadExtension { }
+
+abstract class Super {
+ public final void finalPublic() {}
+
+ public void justPublic() {}
+ public int intPublic() {}
+
+ public abstract void abstractWithBody() {} //ERROR shouldn't have a body
+
+ public abstract void abstractPublic();
+
+ public static final void staticFinalPublic() {}
+}
+
+class Sub extends Super { //ERROR must implement abstractPublic
+ public void finalPublic() {} //ERROR can't override final
+ void justPublic() {} //ERROR can't override with weaker access
+ public void intPublic() {} //ERROR can't change the return type
+
+ public static void staticFinalPublic() {} //ERROR can't even override static finals
+}
+
+
+
+interface I1 {
+ void m();
+}
+
+interface I2 {
+ int m();
+}
+
+class C12 implements I1, I2 {
+ public void m() {} //ERROR incompatible return types with I2.m()
+}
+
+interface I12 extends I1, I2 {} //ERROR I1.m() and I2.m() are not compatible