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

emilles 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 9673c664aa GROOVY-11182: add test case
9673c664aa is described below

commit 9673c664aac45aadba720bdbc9c9f97c2c1c3bda
Author: Eric Milles <[email protected]>
AuthorDate: Wed Mar 12 22:09:54 2025 -0500

    GROOVY-11182: add test case
---
 src/test/groovy/bugs/Groovy11182.groovy | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/src/test/groovy/bugs/Groovy11182.groovy 
b/src/test/groovy/bugs/Groovy11182.groovy
new file mode 100644
index 0000000000..5ab15e05fc
--- /dev/null
+++ b/src/test/groovy/bugs/Groovy11182.groovy
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.bugs
+
+import org.junit.Test
+
+import static groovy.test.GroovyAssert.assertScript
+
+final class Groovy11182 {
+    @Test
+    void testVariadicPrimitiveArray() {
+        assertScript '''
+            def foo(byte[]... byteArrays) {
+                assert byteArrays.length == 1
+                assert byteArrays[0].length == 4
+            }
+
+            foo("test".bytes)
+        '''
+    }
+}

Reply via email to