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

AstNodeToScriptVisitor - wrong "extends/implements" order

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.x, 2.5.x
    • Fix Version/s: 3.0.0-alpha-4, 2.5.5
    • Component/s: Groovy Console
    • Labels:
      None

      Description

      When the below code is restored using GroovyConsole (AstNodeToScriptVisitor), the restored code has wrong order of extends/implements key words that is unsupported by Groovy and Java:

      Original code:

      class Foo extends Object implements Runnable {
      
          void run() {}
      
      }
      

      Actual Restored by AstNodeToScriptVisitor:

      public class Foo implements java.lang.Runnable, groovy.lang.GroovyObject extends java.lang.Object { 
      ...
      }
      

      Expected Restored by AstNodeToScriptVisitor:

      public class Foo extends java.lang.Object   implements java.lang.Runnable, groovy.lang.GroovyObject { 
      ...
      }
      

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              anton.pryamostanov Anton Pryamostanov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: