Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1328 cleanup strategy of choosing the class to execute when a file contains multiple classes
  3. GROOVY-4264

Issure related to ordering of generated classes when a script has multiple classes

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.4, 1.8-beta-1
    • 1.7.4, 1.8-beta-1
    • None
    • None

    Description

      Test.groovy
      class B extends A {
           static main(args){}
      }
      
      class A {}
      

      fails with

      Caught: groovy.lang.GroovyRuntimeException: This script or class could not be run.
      It should either: 
      - have a main method, 
      - be a JUnit test, TestNG test or extend GroovyTestCase, 
      - or implement the Runnable interface.
      

      Attachments

        1. 4264_v18x.patch
          4 kB
          Roshan Dawrani

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              roshandawrani Roshan Dawrani
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: