Thu, 25 Sep 2014 11:02:03 -0700
Merge
1.1 --- a/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Wed Sep 24 11:38:26 2014 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Thu Sep 25 11:02:03 2014 -0700 1.3 @@ -497,13 +497,11 @@ 1.4 } 1.5 } 1.6 if (!progress) { 1.7 - DeferredAttrContext dac = this; 1.8 - while (dac != emptyDeferredAttrContext) { 1.9 - if (dac.mode == AttrMode.SPECULATIVE) { 1.10 - //unsticking does not take place during overload 1.11 - break; 1.12 + if (insideOverloadPhase()) { 1.13 + for (DeferredAttrNode deferredNode: deferredAttrNodes) { 1.14 + deferredNode.dt.tree.type = Type.noType; 1.15 } 1.16 - dac = dac.parent; 1.17 + return; 1.18 } 1.19 //remove all variables that have already been instantiated 1.20 //from the list of stuck variables 1.21 @@ -519,6 +517,17 @@ 1.22 } 1.23 } 1.24 } 1.25 + 1.26 + private boolean insideOverloadPhase() { 1.27 + DeferredAttrContext dac = this; 1.28 + if (dac == emptyDeferredAttrContext) { 1.29 + return false; 1.30 + } 1.31 + if (dac.mode == AttrMode.SPECULATIVE) { 1.32 + return true; 1.33 + } 1.34 + return dac.parent.insideOverloadPhase(); 1.35 + } 1.36 } 1.37 1.38 /** 1.39 @@ -579,6 +588,8 @@ 1.40 return false; 1.41 } 1.42 } else { 1.43 + Assert.check(!deferredAttrContext.insideOverloadPhase(), 1.44 + "attribution shouldn't be happening here"); 1.45 ResultInfo instResultInfo = 1.46 resultInfo.dup(deferredAttrContext.inferenceContext.asInstType(resultInfo.pt)); 1.47 dt.check(instResultInfo, dummyStuckPolicy, basicCompleter); 1.48 @@ -1314,6 +1325,12 @@ 1.49 site = env.enclClass.sym.type; 1.50 } 1.51 1.52 + while (site.hasTag(TYPEVAR)) { 1.53 + site = site.getUpperBound(); 1.54 + } 1.55 + 1.56 + site = types.capture(site); 1.57 + 1.58 List<Type> args = rs.dummyArgs(tree.args.length()); 1.59 Name name = TreeInfo.name(tree.meth); 1.60 1.61 @@ -1337,7 +1354,9 @@ 1.62 @Override 1.63 public Symbol process(MethodSymbol ms) { 1.64 ArgumentExpressionKind kind = ArgumentExpressionKind.methodKind(ms, types); 1.65 - return kind != ArgumentExpressionKind.POLY ? ms.getReturnType().tsym : null; 1.66 + if (kind == ArgumentExpressionKind.POLY || ms.getReturnType().hasTag(TYPEVAR)) 1.67 + return null; 1.68 + return ms.getReturnType().tsym; 1.69 } 1.70 @Override 1.71 public Symbol reduce(Symbol s1, Symbol s2) {
2.1 --- a/src/share/classes/com/sun/tools/javac/comp/Flow.java Wed Sep 24 11:38:26 2014 -0700 2.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java Thu Sep 25 11:02:03 2014 -0700 2.3 @@ -208,7 +208,7 @@ 2.4 2.5 public void analyzeTree(Env<AttrContext> env, TreeMaker make) { 2.6 new AliveAnalyzer().analyzeTree(env, make); 2.7 - new AssignAnalyzer(log, syms, lint, names, enforceThisDotInit).analyzeTree(env); 2.8 + new AssignAnalyzer().analyzeTree(env); 2.9 new FlowAnalyzer().analyzeTree(env, make); 2.10 new CaptureAnalyzer().analyzeTree(env, make); 2.11 } 2.12 @@ -241,7 +241,7 @@ 2.13 //related errors, which will allow for more errors to be detected 2.14 Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log); 2.15 try { 2.16 - new AssignAnalyzer(log, syms, lint, names, enforceThisDotInit) { 2.17 + new AssignAnalyzer() { 2.18 @Override 2.19 protected boolean trackable(VarSymbol sym) { 2.20 return !env.info.scope.includes(sym) && 2.21 @@ -1373,12 +1373,12 @@ 2.22 * effectively-final local variables/parameters. 2.23 */ 2.24 2.25 - public abstract static class AbstractAssignAnalyzer<P extends AbstractAssignAnalyzer.AbstractAssignPendingExit> 2.26 + public abstract class AbstractAssignAnalyzer<P extends AbstractAssignAnalyzer<P>.AbstractAssignPendingExit> 2.27 extends BaseAnalyzer<P> { 2.28 2.29 /** The set of definitely assigned variables. 2.30 */ 2.31 - protected final Bits inits; 2.32 + protected Bits inits; 2.33 2.34 /** The set of definitely unassigned variables. 2.35 */ 2.36 @@ -1432,13 +1432,7 @@ 2.37 /** The starting position of the analysed tree */ 2.38 int startPos; 2.39 2.40 - final Symtab syms; 2.41 - 2.42 - protected Names names; 2.43 - 2.44 - final boolean enforceThisDotInit; 2.45 - 2.46 - public static class AbstractAssignPendingExit extends BaseAnalyzer.PendingExit { 2.47 + public class AbstractAssignPendingExit extends BaseAnalyzer.PendingExit { 2.48 2.49 final Bits inits; 2.50 final Bits uninits; 2.51 @@ -1460,17 +1454,14 @@ 2.52 } 2.53 } 2.54 2.55 - public AbstractAssignAnalyzer(Bits inits, Symtab syms, Names names, boolean enforceThisDotInit) { 2.56 - this.inits = inits; 2.57 + public AbstractAssignAnalyzer() { 2.58 + this.inits = new Bits(); 2.59 uninits = new Bits(); 2.60 uninitsTry = new Bits(); 2.61 initsWhenTrue = new Bits(true); 2.62 initsWhenFalse = new Bits(true); 2.63 uninitsWhenTrue = new Bits(true); 2.64 uninitsWhenFalse = new Bits(true); 2.65 - this.syms = syms; 2.66 - this.names = names; 2.67 - this.enforceThisDotInit = enforceThisDotInit; 2.68 } 2.69 2.70 private boolean isInitialConstructor = false; 2.71 @@ -2439,26 +2430,15 @@ 2.72 } 2.73 } 2.74 2.75 - public static class AssignAnalyzer 2.76 - extends AbstractAssignAnalyzer<AssignAnalyzer.AssignPendingExit> { 2.77 + public class AssignAnalyzer extends AbstractAssignAnalyzer<AssignAnalyzer.AssignPendingExit> { 2.78 2.79 - Log log; 2.80 - Lint lint; 2.81 - 2.82 - public static class AssignPendingExit 2.83 - extends AbstractAssignAnalyzer.AbstractAssignPendingExit { 2.84 + public class AssignPendingExit extends AbstractAssignAnalyzer<AssignPendingExit>.AbstractAssignPendingExit { 2.85 2.86 public AssignPendingExit(JCTree tree, final Bits inits, final Bits uninits) { 2.87 super(tree, inits, uninits); 2.88 } 2.89 } 2.90 2.91 - public AssignAnalyzer(Log log, Symtab syms, Lint lint, Names names, boolean enforceThisDotInit) { 2.92 - super(new Bits(), syms, names, enforceThisDotInit); 2.93 - this.log = log; 2.94 - this.lint = lint; 2.95 - } 2.96 - 2.97 @Override 2.98 protected AssignPendingExit createNewPendingExit(JCTree tree, 2.99 Bits inits, Bits uninits) {
3.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java Wed Sep 24 11:38:26 2014 -0700 3.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Sep 25 11:02:03 2014 -0700 3.3 @@ -74,6 +74,7 @@ 3.4 private Name accessDollar; 3.5 private final Types types; 3.6 private final Lower lower; 3.7 + private final Flow flow; 3.8 3.9 /** Switch: GJ mode? 3.10 */ 3.11 @@ -125,6 +126,7 @@ 3.12 stringBufferAppend = new HashMap<Type,Symbol>(); 3.13 accessDollar = names. 3.14 fromString("access" + target.syntheticNameChar()); 3.15 + flow = Flow.instance(context); 3.16 lower = Lower.instance(context); 3.17 3.18 Options options = Options.instance(context); 3.19 @@ -2516,9 +2518,7 @@ 3.20 */ 3.21 if (varDebugInfo && (cdef.sym.flags() & SYNTHETIC) == 0) { 3.22 try { 3.23 - LVTAssignAnalyzer lvtAssignAnalyzer = LVTAssignAnalyzer.make( 3.24 - lvtRanges, syms, names); 3.25 - lvtAssignAnalyzer.analyzeTree(localEnv); 3.26 + new LVTAssignAnalyzer().analyzeTree(localEnv); 3.27 } catch (Throwable e) { 3.28 throw e; 3.29 } 3.30 @@ -2609,11 +2609,10 @@ 3.31 } 3.32 } 3.33 3.34 - static class LVTAssignAnalyzer 3.35 + class LVTAssignAnalyzer 3.36 extends Flow.AbstractAssignAnalyzer<LVTAssignAnalyzer.LVTAssignPendingExit> { 3.37 3.38 final LVTBits lvtInits; 3.39 - final LVTRanges lvtRanges; 3.40 3.41 /* This class is anchored to a context dependent tree. The tree can 3.42 * vary inside the same instruction for example in the switch instruction 3.43 @@ -2621,35 +2620,12 @@ 3.44 * to a given case. The aim is to always anchor the bits to the tree 3.45 * capable of closing a DA range. 3.46 */ 3.47 - static class LVTBits extends Bits { 3.48 - 3.49 - enum BitsOpKind { 3.50 - INIT, 3.51 - CLEAR, 3.52 - INCL_BIT, 3.53 - EXCL_BIT, 3.54 - ASSIGN, 3.55 - AND_SET, 3.56 - OR_SET, 3.57 - DIFF_SET, 3.58 - XOR_SET, 3.59 - INCL_RANGE, 3.60 - EXCL_RANGE, 3.61 - } 3.62 + class LVTBits extends Bits { 3.63 3.64 JCTree currentTree; 3.65 - LVTAssignAnalyzer analyzer; 3.66 private int[] oldBits = null; 3.67 BitsState stateBeforeOp; 3.68 3.69 - LVTBits() { 3.70 - super(false); 3.71 - } 3.72 - 3.73 - LVTBits(int[] bits, BitsState initState) { 3.74 - super(bits, initState); 3.75 - } 3.76 - 3.77 @Override 3.78 public void clear() { 3.79 generalOp(null, -1, BitsOpKind.CLEAR); 3.80 @@ -2757,12 +2733,11 @@ 3.81 if (currentTree != null && 3.82 stateBeforeOp != BitsState.UNKNOWN && 3.83 trackTree(currentTree)) { 3.84 - List<VarSymbol> locals = 3.85 - analyzer.lvtRanges 3.86 - .getVars(analyzer.currentMethod, currentTree); 3.87 + List<VarSymbol> locals = lvtRanges 3.88 + .getVars(currentMethod, currentTree); 3.89 locals = locals != null ? 3.90 locals : List.<VarSymbol>nil(); 3.91 - for (JCVariableDecl vardecl : analyzer.vardecls) { 3.92 + for (JCVariableDecl vardecl : vardecls) { 3.93 //once the first is null, the rest will be so. 3.94 if (vardecl == null) { 3.95 break; 3.96 @@ -2772,7 +2747,7 @@ 3.97 } 3.98 } 3.99 if (!locals.isEmpty()) { 3.100 - analyzer.lvtRanges.setEntry(analyzer.currentMethod, 3.101 + lvtRanges.setEntry(currentMethod, 3.102 currentTree, locals); 3.103 } 3.104 } 3.105 @@ -2790,7 +2765,7 @@ 3.106 boolean trackVar(VarSymbol var) { 3.107 return (var.owner.kind == MTH && 3.108 (var.flags() & PARAMETER) == 0 && 3.109 - analyzer.trackable(var)); 3.110 + trackable(var)); 3.111 } 3.112 3.113 boolean trackTree(JCTree tree) { 3.114 @@ -2806,7 +2781,8 @@ 3.115 3.116 } 3.117 3.118 - public class LVTAssignPendingExit extends Flow.AssignAnalyzer.AssignPendingExit { 3.119 + public class LVTAssignPendingExit extends 3.120 + Flow.AbstractAssignAnalyzer<LVTAssignPendingExit>.AbstractAssignPendingExit { 3.121 3.122 LVTAssignPendingExit(JCTree tree, final Bits inits, final Bits uninits) { 3.123 super(tree, inits, uninits); 3.124 @@ -2819,16 +2795,10 @@ 3.125 } 3.126 } 3.127 3.128 - private LVTAssignAnalyzer(LVTRanges lvtRanges, Symtab syms, Names names) { 3.129 - super(new LVTBits(), syms, names, false); 3.130 - lvtInits = (LVTBits)inits; 3.131 - this.lvtRanges = lvtRanges; 3.132 - } 3.133 - 3.134 - public static LVTAssignAnalyzer make(LVTRanges lvtRanges, Symtab syms, Names names) { 3.135 - LVTAssignAnalyzer result = new LVTAssignAnalyzer(lvtRanges, syms, names); 3.136 - result.lvtInits.analyzer = result; 3.137 - return result; 3.138 + private LVTAssignAnalyzer() { 3.139 + flow.super(); 3.140 + lvtInits = new LVTBits(); 3.141 + inits = lvtInits; 3.142 } 3.143 3.144 @Override
4.1 --- a/src/share/classes/com/sun/tools/javac/util/Bits.java Wed Sep 24 11:38:26 2014 -0700 4.2 +++ b/src/share/classes/com/sun/tools/javac/util/Bits.java Thu Sep 25 11:02:03 2014 -0700 4.3 @@ -84,6 +84,20 @@ 4.4 4.5 } 4.6 4.7 + public enum BitsOpKind { 4.8 + INIT, 4.9 + CLEAR, 4.10 + INCL_BIT, 4.11 + EXCL_BIT, 4.12 + ASSIGN, 4.13 + AND_SET, 4.14 + OR_SET, 4.15 + DIFF_SET, 4.16 + XOR_SET, 4.17 + INCL_RANGE, 4.18 + EXCL_RANGE, 4.19 + } 4.20 + 4.21 private final static int wordlen = 32; 4.22 private final static int wordshift = 5; 4.23 private final static int wordmask = wordlen - 1;
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/test/tools/javac/lambda/T8033483/IgnoreLambdaBodyDuringResolutionTest1.java Thu Sep 25 11:02:03 2014 -0700 5.3 @@ -0,0 +1,31 @@ 5.4 +/* 5.5 + * @test /nodynamiccopyright/ 5.6 + * @bug 8033483 5.7 + * @summary Should ignore nested lambda bodies during overload resolution 5.8 + * @compile/fail/ref=IgnoreLambdaBodyDuringResolutionTest1.out -XDrawDiagnostics IgnoreLambdaBodyDuringResolutionTest1.java 5.9 + */ 5.10 + 5.11 +class IgnoreLambdaBodyDuringResolutionTest1 { 5.12 + interface SAM<T> { 5.13 + T action(T t); 5.14 + } 5.15 + 5.16 + <T> T m(SAM<T> op) { 5.17 + return null; 5.18 + } 5.19 + 5.20 + class B { 5.21 + B x() { 5.22 + return this; 5.23 + } 5.24 + } 5.25 + 5.26 + class C {} 5.27 + 5.28 + void foo(B arg) {} 5.29 + void foo(C arg) {} 5.30 + 5.31 + void bar() { 5.32 + foo(m(arg -> new B())); 5.33 + } 5.34 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/test/tools/javac/lambda/T8033483/IgnoreLambdaBodyDuringResolutionTest1.out Thu Sep 25 11:02:03 2014 -0700 6.3 @@ -0,0 +1,2 @@ 6.4 +IgnoreLambdaBodyDuringResolutionTest1.java:29:9: compiler.err.ref.ambiguous: foo, kindname.method, foo(IgnoreLambdaBodyDuringResolutionTest1.B), IgnoreLambdaBodyDuringResolutionTest1, kindname.method, foo(IgnoreLambdaBodyDuringResolutionTest1.C), IgnoreLambdaBodyDuringResolutionTest1 6.5 +1 error
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/test/tools/javac/lambda/T8033483/IgnoreLambdaBodyDuringResolutionTest2.java Thu Sep 25 11:02:03 2014 -0700 7.3 @@ -0,0 +1,34 @@ 7.4 +/* 7.5 + * @test /nodynamiccopyright/ 7.6 + * @bug 8033483 7.7 + * @summary Should ignore nested lambda bodies during overload resolution 7.8 + * @compile/fail/ref=IgnoreLambdaBodyDuringResolutionTest2.out -XDrawDiagnostics IgnoreLambdaBodyDuringResolutionTest2.java 7.9 + */ 7.10 + 7.11 +class IgnoreLambdaBodyDuringResolutionTest2 { 7.12 + interface SAM<S> { 7.13 + boolean test(S t); 7.14 + } 7.15 + 7.16 + <I, T extends I> I bar(final T l) { 7.17 + return null; 7.18 + } 7.19 + 7.20 + class D<D1, D2> { 7.21 + void foo() { 7.22 + m(bar(e -> false)); 7.23 + } 7.24 + 7.25 + void m(Class<D1> arg) {} 7.26 + void m(SAM<D2> arg) {} 7.27 + } 7.28 + 7.29 + class F { 7.30 + void foo() { 7.31 + m(bar((String e) -> false)); 7.32 + } 7.33 + 7.34 + <F1> void m(Class<F1> arg) {} 7.35 + <F2> void m(SAM<F2> arg) {} 7.36 + } 7.37 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/test/tools/javac/lambda/T8033483/IgnoreLambdaBodyDuringResolutionTest2.out Thu Sep 25 11:02:03 2014 -0700 8.3 @@ -0,0 +1,6 @@ 8.4 +IgnoreLambdaBodyDuringResolutionTest2.java:19:13: compiler.err.ref.ambiguous: m, kindname.method, m(java.lang.Class<D1>), IgnoreLambdaBodyDuringResolutionTest2.D, kindname.method, m(IgnoreLambdaBodyDuringResolutionTest2.SAM<D2>), IgnoreLambdaBodyDuringResolutionTest2.D 8.5 +IgnoreLambdaBodyDuringResolutionTest2.java:19:18: compiler.err.prob.found.req: (compiler.misc.infer.no.conforming.assignment.exists: I,T, (compiler.misc.not.a.functional.intf: java.lang.Object)) 8.6 +IgnoreLambdaBodyDuringResolutionTest2.java:19:14: compiler.err.cant.apply.symbol: kindname.method, m, java.lang.Class<D1>, <any>, kindname.class, IgnoreLambdaBodyDuringResolutionTest2.D<D1,D2>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.assignment.exists: I,T, (compiler.misc.not.a.functional.intf: java.lang.Class))) 8.7 +IgnoreLambdaBodyDuringResolutionTest2.java:28:13: compiler.err.ref.ambiguous: m, kindname.method, <F1>m(java.lang.Class<F1>), IgnoreLambdaBodyDuringResolutionTest2.F, kindname.method, <F2>m(IgnoreLambdaBodyDuringResolutionTest2.SAM<F2>), IgnoreLambdaBodyDuringResolutionTest2.F 8.8 +IgnoreLambdaBodyDuringResolutionTest2.java:28:14: compiler.err.prob.found.req: (compiler.misc.infer.no.conforming.assignment.exists: I,T, (compiler.misc.not.a.functional.intf: java.lang.Class)) 8.9 +5 errors
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/test/tools/javac/lambda/T8056014.java Thu Sep 25 11:02:03 2014 -0700 9.3 @@ -0,0 +1,70 @@ 9.4 +/* 9.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 9.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.7 + * 9.8 + * This code is free software; you can redistribute it and/or modify it 9.9 + * under the terms of the GNU General Public License version 2 only, as 9.10 + * published by the Free Software Foundation. 9.11 + * 9.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 9.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 9.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 9.15 + * version 2 for more details (a copy is included in the LICENSE file that 9.16 + * accompanied this code). 9.17 + * 9.18 + * You should have received a copy of the GNU General Public License version 9.19 + * 2 along with this work; if not, write to the Free Software Foundation, 9.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 9.21 + * 9.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 9.23 + * or visit www.oracle.com if you need additional information or have any 9.24 + * questions. 9.25 + */ 9.26 + 9.27 +/** 9.28 + * @test 9.29 + * @bug 8056014 9.30 + * @summary Verify that full type inference is used when calling a method on a type variable. 9.31 + * @compile T8056014.java 9.32 + * @run main T8056014 9.33 + */ 9.34 + 9.35 +import java.util.*; 9.36 + 9.37 +public class T8056014 { 9.38 + public static void main(String[] args) { 9.39 + new T8056014().run(); 9.40 + } 9.41 + 9.42 + void run() { 9.43 + List<S> l = Arrays.asList(new S()); 9.44 + C<S> c = new C<>(new S()); 9.45 + foo(l.get(0).copy(1)); 9.46 + foo(c.get(0).copy(1)); 9.47 + } 9.48 + 9.49 + void foo(S d) { 9.50 + } 9.51 +} 9.52 + 9.53 +class B { 9.54 + public B copy(long j) { 9.55 + throw new AssertionError("Should not get here."); 9.56 + } 9.57 +} 9.58 + 9.59 +class S extends B { 9.60 + public <T> T copy(int i) { 9.61 + return null; 9.62 + } 9.63 +} 9.64 + 9.65 +class C<T extends B> { 9.66 + final T t; 9.67 + public C(T t) { 9.68 + this.t = t; 9.69 + } 9.70 + public T get(int i) { 9.71 + return t; 9.72 + } 9.73 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/test/tools/javac/lambda/T8056984.java Thu Sep 25 11:02:03 2014 -0700 10.3 @@ -0,0 +1,41 @@ 10.4 +/* 10.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 10.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.7 + * 10.8 + * This code is free software; you can redistribute it and/or modify it 10.9 + * under the terms of the GNU General Public License version 2 only, as 10.10 + * published by the Free Software Foundation. 10.11 + * 10.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 10.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10.15 + * version 2 for more details (a copy is included in the LICENSE file that 10.16 + * accompanied this code). 10.17 + * 10.18 + * You should have received a copy of the GNU General Public License version 10.19 + * 2 along with this work; if not, write to the Free Software Foundation, 10.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 10.21 + * 10.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 10.23 + * or visit www.oracle.com if you need additional information or have any 10.24 + * questions. 10.25 + */ 10.26 + 10.27 +/* 10.28 + * @test 10.29 + * @bug 8056984 10.30 + * @summary Ensure that method resolution runs over a captured type variables when checking if 10.31 + * deferred attribution is needed 10.32 + * @compile T8056984.java 10.33 + */ 10.34 +class T8056984<T1 extends B&C, T2 extends T1> { 10.35 + public T8056984(T1 t1, T2 t2) { 10.36 + System.err.println(t1.hashCode()); 10.37 + System.err.println(t2.hashCode()); 10.38 + } 10.39 +} 10.40 +class B { 10.41 +} 10.42 +interface C { 10.43 + public int hashCode(); 10.44 +}