提交 6152ca16 编写于 作者: M mcimadamore

8002286: Regression: Fix for 8000931 causes a JCK test failure

Summary: Wrong type used as 'site' in Resolve.resolveMethod
Reviewed-by: jjg
上级 1ea6c13b
......@@ -2022,7 +2022,7 @@ public class Resolve {
Name name,
List<Type> argtypes,
List<Type> typeargtypes) {
return lookupMethod(env, pos, env.enclClass.sym, new BasicLookupHelper(name, env.enclClass.type, argtypes, typeargtypes) {
return lookupMethod(env, pos, env.enclClass.sym, new BasicLookupHelper(name, env.enclClass.sym.type, argtypes, typeargtypes) {
@Override
Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) {
return findFun(env, name, argtypes, typeargtypes,
......
/*
* @test /nodynamiccopyright/
* @bug 8002286
* @summary Resolve should support nested resolution contexts
* @compile/fail/ref=T8002286.out -XDrawDiagnostics T8002286.java
*/
class T8002286 {
@Anno(nonExistent())
static class Test { }
@interface Anno { }
}
T8002286.java:8:22: compiler.err.cant.resolve.location.args: kindname.method, value, , , (compiler.misc.location: kindname.annotation, T8002286.Anno, null)
T8002286.java:8:11: compiler.err.cant.resolve.location.args: kindname.method, nonExistent, , , (compiler.misc.location: kindname.class, T8002286, null)
2 errors
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册