8005964: Regression: difference in error recovery after ambiguity causes JCK test failure

Wrong implementation of ResolveError.access in AmbiguityError

Reviewed-by: jjh
This commit is contained in:
Maurizio Cimadamore 2013-01-16 17:40:28 +00:00
parent 3b3feb3853
commit 5a60f56dbe

View File

@ -3421,7 +3421,10 @@ public class Resolve {
@Override
protected Symbol access(Name name, TypeSymbol location) {
return ambiguousSyms.last();
Symbol firstAmbiguity = ambiguousSyms.last();
return firstAmbiguity.kind == TYP ?
types.createErrorType(name, location, firstAmbiguity.type).tsym :
firstAmbiguity;
}
}