You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/12/18 11:32:27 UTC

[groovy] branch master updated: GROOVY-8931: AstNodeToScriptVisitor - wrong "extends/implements" order (tweak test)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new f667007  GROOVY-8931: AstNodeToScriptVisitor - wrong "extends/implements" order (tweak test)
f667007 is described below

commit f667007269f95d212a835f7e38aff8bb8d0eec35
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Dec 18 21:32:17 2018 +1000

    GROOVY-8931: AstNodeToScriptVisitor - wrong "extends/implements" order (tweak test)
---
 .../groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy b/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy
index 085a553..e42f173 100644
--- a/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy
+++ b/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy
@@ -109,7 +109,7 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase {
                    int size() {}
                 }'''
         String result = compileToScript(script, CompilePhase.SEMANTIC_ANALYSIS)
-        assert result.contains('public class MyList<E> implements java.util.List<E> extends java.util.AbstractList<E> {')
+        assert result.contains('public class MyList<E> extends java.util.AbstractList<E> implements java.util.List<E> {')
     }
 
     void testGenericBoundsOnClass() {
@@ -117,8 +117,8 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase {
                     abstract class MyClass<T extends String & Callable<String>, U extends Integer> extends AbstractList<String> implements Callable<? super Number> { }  '''
         String result = compileToScript(script, CompilePhase.SEMANTIC_ANALYSIS)
         assert result.contains('MyClass<T extends java.lang.String & java.util.concurrent.Callable<String>, U extends java.lang.Integer> ' +
-                'implements java.util.concurrent.Callable<? super java.lang.Number> ' +
-                'extends java.util.AbstractList<String> {')
+                'extends java.util.AbstractList<String> ' +
+                'implements java.util.concurrent.Callable<? super java.lang.Number> {')
     }
 
     void testGenericsInVariables() {
@@ -156,7 +156,7 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase {
                                  void addBranch(Tree<? extends V> branch) { branches.add(branch); }
                              } '''
         String result = compileToScript(script, CompilePhase.CLASS_GENERATION)
-        assert result.contains('public class Tree<V> implements groovy.lang.GroovyObject extends java.lang.Object')
+        assert result.contains('public class Tree<V> extends java.lang.Object implements groovy.lang.GroovyObject')
         assert result.contains('private java.lang.Object<V> value') // todo: is Object<V> correct? How do you know?
         assert result.contains('private java.util.List<Tree> branches') // should the <? extends V> be dropped?
         assert result.contains('branches = new java.util.ArrayList<Tree>()') // should the <? extends V> be dropped?