1.1 --- a/test/tools/javac/lambda/TestInvokeDynamic.java Fri Dec 14 11:16:46 2012 +0000 1.2 +++ b/test/tools/javac/lambda/TestInvokeDynamic.java Sat Dec 15 13:54:51 2012 +0000 1.3 @@ -50,6 +50,7 @@ 1.4 import com.sun.tools.javac.code.Symbol; 1.5 import com.sun.tools.javac.code.Symbol.MethodSymbol; 1.6 import com.sun.tools.javac.code.Symtab; 1.7 +import com.sun.tools.javac.code.Types; 1.8 import com.sun.tools.javac.jvm.Pool; 1.9 import com.sun.tools.javac.tree.JCTree.JCMethodInvocation; 1.10 import com.sun.tools.javac.tree.JCTree.JCMethodDecl; 1.11 @@ -151,7 +152,7 @@ 1.12 1.13 abstract boolean check(CPInfo cpInfo) throws Exception; 1.14 1.15 - Object getValue(Symtab syms, Names names) { 1.16 + Object getValue(Symtab syms, Names names, Types types) { 1.17 switch (this) { 1.18 case STRING: 1.19 case INTEGER: 1.20 @@ -162,7 +163,7 @@ 1.21 case CLASS: 1.22 return syms.stringType.tsym; 1.23 case METHOD_HANDLE: 1.24 - return new Pool.MethodHandle(REF_invokeVirtual, syms.arrayCloneMethod); 1.25 + return new Pool.MethodHandle(REF_invokeVirtual, syms.arrayCloneMethod, types); 1.26 case METHOD_TYPE: 1.27 return syms.arrayCloneMethod.type; 1.28 default: 1.29 @@ -231,7 +232,8 @@ 1.30 Context context = ct.getContext(); 1.31 Symtab syms = Symtab.instance(context); 1.32 Names names = Names.instance(context); 1.33 - ct.addTaskListener(new Indifier(syms, names)); 1.34 + Types types = Types.instance(context); 1.35 + ct.addTaskListener(new Indifier(syms, names, types)); 1.36 try { 1.37 ct.generate(); 1.38 } catch (Throwable t) { 1.39 @@ -378,10 +380,12 @@ 1.40 MethodSymbol bsm; 1.41 Symtab syms; 1.42 Names names; 1.43 + Types types; 1.44 1.45 - Indifier(Symtab syms, Names names) { 1.46 + Indifier(Symtab syms, Names names, Types types) { 1.47 this.syms = syms; 1.48 this.names = names; 1.49 + this.types = types; 1.50 } 1.51 1.52 @Override 1.53 @@ -405,7 +409,7 @@ 1.54 if (!oldSym.isConstructor()) { 1.55 Object[] staticArgs = new Object[arity.arity]; 1.56 for (int i = 0; i < arity.arity ; i++) { 1.57 - staticArgs[i] = saks[i].getValue(syms, names); 1.58 + staticArgs[i] = saks[i].getValue(syms, names, types); 1.59 } 1.60 ident.sym = new Symbol.DynamicMethodSymbol(oldSym.name, oldSym.owner, REF_invokeStatic, bsm, oldSym.type, staticArgs); 1.61 }