You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by pa...@apache.org on 2015/05/21 19:13:43 UTC
incubator-groovy git commit: GROOVY-7420: Add a failing test (closes
#10)
Repository: incubator-groovy
Updated Branches:
refs/heads/master 4713f5c39 -> f568e2392
GROOVY-7420: Add a failing test (closes #10)
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/f568e239
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/f568e239
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/f568e239
Branch: refs/heads/master
Commit: f568e23928ad2061104ae7bf7f8a22334d742c3e
Parents: 4713f5c
Author: Frank Pavageau <fp...@ekino.com>
Authored: Sun May 10 22:40:17 2015 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu May 21 19:11:17 2015 +0200
----------------------------------------------------------------------
.../classgen/asm/sc/bugs/Groovy7420Bug.groovy | 43 ++++++++++++++++++++
1 file changed, 43 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/f568e239/src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy7420Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy7420Bug.groovy b/src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy7420Bug.groovy
new file mode 100644
index 0000000..82642e1
--- /dev/null
+++ b/src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy7420Bug.groovy
@@ -0,0 +1,43 @@
+/*
+ * 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 org.codehaus.groovy.classgen.asm.sc.bugs
+
+import groovy.transform.NotYetImplemented
+import groovy.transform.stc.StaticTypeCheckingTestCase
+import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
+
+class Groovy7420Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
+ @NotYetImplemented
+ void testOverloadedMethodWithPrimitiveOrObjectParameter() {
+ assertScript '''
+ class A {
+ static String m(long p) {
+ "primitive"
+ }
+
+ static String m(Long p) {
+ "object"
+ }
+ }
+
+ Long l = 42L
+ assert A.m(l) == "object"
+ '''
+ }
+}