You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2023/02/10 21:41:00 UTC
[jira] [Closed] (GROOVY-7370) Varargs in constructor are not treated correctly when creating instances of anonymous class
[ https://issues.apache.org/jira/browse/GROOVY-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7370.
-----------------------------
> Varargs in constructor are not treated correctly when creating instances of anonymous class
> -------------------------------------------------------------------------------------------
>
> Key: GROOVY-7370
> URL: https://issues.apache.org/jira/browse/GROOVY-7370
> Project: Groovy
> Issue Type: Bug
> Reporter: Nikita Artyushov
> Assignee: Eric Milles
> Priority: Major
> Labels: varargs
> Fix For: 4.0.5
>
>
> Code snippet to reproduce the bug:
> {code}
> class Test {
> public Test(String... args) {
> println args
> }
> public static void main(String[] args) {
> new Test('oneWord')
> new Test('manyLetters') {
> @Override
> int hashCode() {
> return 1;
> }
> }
> }
> }
> {code}
> expected output:
> {code}
> [oneWord]
> [manyLetters]
> {code}
> actual:
> {code}
> [oneWord]
> [m, a, n, y, L, e, t, t, e, r, s]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)