Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4954546

(compound) unverifiable code for method called from ?: expression with inferred

    Details

    • Subcomponent:
    • Resolved In Build:
      b67
    • CPU:
      generic, x86
    • OS:
      linux, solaris_8
    • Verification:
      Verified

      Description

      ==========$ cat -n T.java
           1
           2 class T {
           3 interface I { void f(); }
           4 interface J { void g(); }
           5 static class A implements I, J { public void f(){} public void g(){} }
           6 static class B implements J, I { public void f(){} public void g(){} }
           7 public static void main(String[] args) {
           8 f(true, new A(), new B());
           9 }
          10 static void f(boolean cond, A a, B b) {
          11 (cond?a:b).f();;
          12 (cond?a:b).g();;
          13 }
          14 }
      ==========$ newjavac T.java
      + exec /usr/java1.5/bin/javac -J-esa -source 1.5 -target 1.4 T.java
      ==========$ newjava T
      + /usr/java1.5/bin/java -Xfuture T
      Exception in thread "main" java.lang.NoSuchMethodError: T$I.g()V
              at T.f(T.java:12)
              at T.main(T.java:8)
      ==========$

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                gafter Neal Gafter
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: