GROOVY-8468: add test case
diff --git a/src/test/groovy/bugs/Groovy8468.groovy b/src/test/groovy/bugs/Groovy8468.groovy
new file mode 100644
index 0000000..b15a561
--- /dev/null
+++ b/src/test/groovy/bugs/Groovy8468.groovy
@@ -0,0 +1,46 @@
+/*
+ *  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 groovy.transform.CompileStatic
+import org.junit.Test
+
+import static groovy.test.GroovyAssert.assertScript
+
+@CompileStatic
+final class Groovy8468 {
+
+    @Test
+    void testGenericArrayType() {
+        assertScript '''
+            import groovy.bugs.groovy8468.*
+
+            @groovy.transform.CompileStatic
+            def test() {
+              Factory factory = new FactoryImpl()
+              Face[] array = factory.makeArray(FaceImpl) // NoSuchMethodError: Factory.makeArray(Ljava/lang/Class;)[Ljava/lang/Object;
+              return array
+            }
+
+            def result = test()
+            assert result != null
+            assert result.length == 0
+        '''
+    }
+}
diff --git a/src/test/groovy/bugs/groovy8468/Face.java b/src/test/groovy/bugs/groovy8468/Face.java
new file mode 100644
index 0000000..1ccc9c3
--- /dev/null
+++ b/src/test/groovy/bugs/groovy8468/Face.java
@@ -0,0 +1,22 @@
+/*

+ *  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.groovy8468;

+

+public interface Face {

+}

diff --git a/src/test/groovy/bugs/groovy8468/FaceImpl.java b/src/test/groovy/bugs/groovy8468/FaceImpl.java
new file mode 100644
index 0000000..25e51d9
--- /dev/null
+++ b/src/test/groovy/bugs/groovy8468/FaceImpl.java
@@ -0,0 +1,22 @@
+/*

+ *  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.groovy8468;

+

+public class FaceImpl implements Face {

+}

diff --git a/src/test/groovy/bugs/groovy8468/Factory.java b/src/test/groovy/bugs/groovy8468/Factory.java
new file mode 100644
index 0000000..2281466
--- /dev/null
+++ b/src/test/groovy/bugs/groovy8468/Factory.java
@@ -0,0 +1,23 @@
+/*

+ *  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.groovy8468;

+

+public interface Factory {

+  public <T extends Face> T[] makeArray(Class<T> clazz);

+}

diff --git a/src/test/groovy/bugs/groovy8468/FactoryImpl.java b/src/test/groovy/bugs/groovy8468/FactoryImpl.java
new file mode 100644
index 0000000..1d25532
--- /dev/null
+++ b/src/test/groovy/bugs/groovy8468/FactoryImpl.java
@@ -0,0 +1,32 @@
+/*

+ *  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.groovy8468;

+

+public class FactoryImpl implements Factory {

+  @Override @SuppressWarnings("unchecked")

+  public <T extends Face> T[] makeArray(Class<T> clazz) {

+    return (T[]) java.lang.reflect.Array.newInstance(clazz, 0);

+  }

+

+  /*public static void main(String[] args) {

+    Factory factory = new FactoryImpl();

+    Face[] array = factory.makeArray(FaceImpl.class);

+    System.out.println(array);

+  }*/

+}