You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2018/05/21 09:00:10 UTC

groovy git commit: Rename class `X` to `XforClassWithScript`

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 836da71e9 -> 8e4075b8d


Rename class `X` to `XforClassWithScript`

Generics type parameters normally have a short name, e.g. `T`, `E`, `X`. If the classpath contains a class whose name is very short, the groovy compiler will resolve the generics type parameter with same name as the existing class when resolving the generics type parameter failed.

See http://groovy.329449.n5.nabble.com/VOTE-Release-Apache-Groovy-2-5-0-rc-3-tp5750728p5750772.html

(cherry picked from commit 6a8682a)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/8e4075b8
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/8e4075b8
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/8e4075b8

Branch: refs/heads/GROOVY_2_6_X
Commit: 8e4075b8d7cc7b3e96c3f54555d6572be8566a07
Parents: 836da71
Author: sunlan <su...@apache.org>
Authored: Mon May 21 16:58:41 2018 +0800
Committer: sunlan <su...@apache.org>
Committed: Mon May 21 17:00:05 2018 +0800

----------------------------------------------------------------------
 src/test/groovy/script/ClassWithScript.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/8e4075b8/src/test/groovy/script/ClassWithScript.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/script/ClassWithScript.groovy b/src/test/groovy/script/ClassWithScript.groovy
index ed0a2ef..b28fd67 100644
--- a/src/test/groovy/script/ClassWithScript.groovy
+++ b/src/test/groovy/script/ClassWithScript.groovy
@@ -16,6 +16,6 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-class X {}
-x = new X()
+class XforClassWithScript {}
+x = new XforClassWithScript()
 println(x)
\ No newline at end of file