Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7135

non-existing method use with super passes type checker in trait

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.7, 2.4.0-beta-3
    • None
    • Static Type Checker

    Description

      If a trait uses "super.foo()" then this passes the compiler even if there is no foo method defined in the hierarchy of the current trait. Example :

      @groovy.transform.CompileStatic
      trait B {
          void bar(){super.foo()}
      }
      class X implements B{}
      new X().bar()
      

      The compiler should complain for about the super.foo() call

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              blackdrag Jochen Theodorou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: