Tue, 06 Nov 2012 14:45:27 +0000
8002286: Regression: Fix for 8000931 causes a JCK test failure
Summary: Wrong type used as 'site' in Resolve.resolveMethod
Reviewed-by: jjg
1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Oct 31 10:21:14 2012 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Nov 06 14:45:27 2012 +0000 1.3 @@ -2022,7 +2022,7 @@ 1.4 Name name, 1.5 List<Type> argtypes, 1.6 List<Type> typeargtypes) { 1.7 - return lookupMethod(env, pos, env.enclClass.sym, new BasicLookupHelper(name, env.enclClass.type, argtypes, typeargtypes) { 1.8 + return lookupMethod(env, pos, env.enclClass.sym, new BasicLookupHelper(name, env.enclClass.sym.type, argtypes, typeargtypes) { 1.9 @Override 1.10 Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) { 1.11 return findFun(env, name, argtypes, typeargtypes,
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/test/tools/javac/8002286/T8002286.java Tue Nov 06 14:45:27 2012 +0000 2.3 @@ -0,0 +1,12 @@ 2.4 +/* 2.5 + * @test /nodynamiccopyright/ 2.6 + * @bug 8002286 2.7 + * @summary Resolve should support nested resolution contexts 2.8 + * @compile/fail/ref=T8002286.out -XDrawDiagnostics T8002286.java 2.9 + */ 2.10 +class T8002286 { 2.11 + @Anno(nonExistent()) 2.12 + static class Test { } 2.13 + 2.14 + @interface Anno { } 2.15 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/test/tools/javac/8002286/T8002286.out Tue Nov 06 14:45:27 2012 +0000 3.3 @@ -0,0 +1,3 @@ 3.4 +T8002286.java:8:22: compiler.err.cant.resolve.location.args: kindname.method, value, , , (compiler.misc.location: kindname.annotation, T8002286.Anno, null) 3.5 +T8002286.java:8:11: compiler.err.cant.resolve.location.args: kindname.method, nonExistent, , , (compiler.misc.location: kindname.class, T8002286, null) 3.6 +2 errors