Repository: incubator-groovy Updated Branches: refs/heads/GROOVY_2_4_X 3e934e9be -> f19e846a1
GROOVY-7420 Add a failing test Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/f19e846a Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/f19e846a Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/f19e846a Branch: refs/heads/GROOVY_2_4_X Commit: f19e846a11cd38b35b52c9600be50eb157aeacac Parents: 3e934e9 Author: Frank Pavageau <fpavag...@ekino.com> Authored: Sun May 10 22:40:17 2015 +0200 Committer: pascalschumacher <pascalschumac...@gmx.net> Committed: Thu May 21 19:14:01 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/f19e846a/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" + ''' + } +}