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

AstNodeToScriptVisitor - wrong "extends/implements" order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.x, 2.5.x
    • 3.0.0-alpha-4, 2.5.5
    • Groovy Console
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: