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

Lambda Spec: Error for static interface method invocation via an expression

    Details

    • Subcomponent:
    • Verification:
      Verified

      Description

      An error should occur when a static method in an interface is invoked via an expression qualifier (rather than unqualified or via a type).

      public class StaticInvoke {

        interface I {
          static void m() { m(); } // ok
        }
        
        void test(I arg) {
          I.m(); // ok
          arg.m(); // error
        }
      }

      javac already implements this error check, but the Lambda Spec does not include it.

        Attachments

          Activity

            People

            • Assignee:
              dlsmith Dan Smith
              Reporter:
              dlsmith Dan Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: