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

Extending trait can't execute static method

    XMLWordPrintableJSON

    Details

      Description

      import groovy.transform.CompileStatic
      
      @CompileStatic
      trait Foo {
          static void go() {
          }
      }
      
      @CompileStatic
      trait Bar extends Foo {
          void doIt() {
              go()
          }
      }
      

      The above code will produce the following:

      [Static type checking] - Cannot find matching method Bar#go(). Please check if the declared type is right and if the method exists.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                Schlogen James Kleeh
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h