Mercurial > hg > icedtea7-forest-aarch64 > langtools
changeset 1382:85fb9d7ce4af icedtea-2.4-branchpoint
Merge jdk7u12-b09
author | andrew |
---|---|
date | Mon, 14 Jan 2013 15:00:15 +0000 |
parents | 698d52b36615 (current diff) e5b1403fa68a (diff) |
children | 31539542e9e5 |
files | .hgtags |
diffstat | 4 files changed, 86 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Jan 03 15:32:39 2013 +0000 +++ b/.hgtags Mon Jan 14 15:00:15 2013 +0000 @@ -235,3 +235,6 @@ e2adb6f53caaa618521bdf965bc484c7ffae190f jdk7u12-b04 454ce2fa72e9ad14e83ebf54636c196d75e35509 jdk7u12-b05 ab820babd394eed07c58bc2bffc58b0d92ca39b8 jdk7u12-b06 +382bab6d9682eefa2185a1643dfa32d65b6c20e5 jdk7u12-b07 +7c0c3aeb2c603baba2cabba9adc5a0a49afb4f47 jdk7u12-b08 +96c4f3ec63552a87a825baabd7f0dfafec299483 jdk7u12-b09
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Jan 03 15:32:39 2013 +0000 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Jan 14 15:00:15 2013 +0000 @@ -1649,13 +1649,15 @@ for (Scope.Entry e1 = t1.tsym.members().elems; e1 != null; e1 = e1.sibling) { Symbol s1 = e1.sym; Type st1 = null; - if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types)) continue; + if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types) || + (s1.flags() & SYNTHETIC) != 0) continue; Symbol impl = ((MethodSymbol)s1).implementation(site.tsym, types, false); if (impl != null && (impl.flags() & ABSTRACT) == 0) continue; for (Scope.Entry e2 = t2.tsym.members().lookup(s1.name); e2.scope != null; e2 = e2.next()) { Symbol s2 = e2.sym; if (s1 == s2) continue; - if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types)) continue; + if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types) || + (s2.flags() & SYNTHETIC) != 0) continue; if (st1 == null) st1 = types.memberType(t1, s1); Type st2 = types.memberType(t2, s2); if (types.overrideEquivalent(st1, st2)) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/generics/8004094/B.java Mon Jan 14 15:00:15 2013 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +abstract class A { + + private static String s = null; + + static void test() { + new Object() { + void m() { + Object o = s; + } + }; + } +} + +public abstract class B<T> extends A { + + private static Integer i = null; + + static void test() { + new Object() { + void m() { + Object o = i; + } + }; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/generics/8004094/T8004094.java Mon Jan 14 15:00:15 2013 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8004094 + * @summary Javac compiler error - synthetic method accessor generated with duplicate name + * + * @compile B.java T8004094.java + */ + +public class T8004094 extends B<Object> { }