You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SuperIsWeird.java 426B

123456789101112131415161718192021222324
  1. class Super {
  2. static void goo() {}
  3. static int getInt() { return 42; }
  4. }
  5. public class SuperIsWeird extends Super {
  6. static void foo0() {
  7. super.goo(); // error
  8. }
  9. void foo1() {
  10. Object o = super; // error
  11. }
  12. void foo2() {
  13. super.goo(); // no error
  14. }
  15. static int v0 = super.getInt(); // error
  16. Object v1 = super; // error
  17. int v2 = super.getInt(); // no error
  18. }