8057685: javac should not crash compiling type annotations
Reviewed-by: jlahoda
This commit is contained in:
parent
ccdbe5b3a1
commit
2d8d2e83ba
@ -356,7 +356,7 @@ public class TypeAnnotations {
|
||||
|
||||
if (sym.getKind() == ElementKind.METHOD) {
|
||||
sym.type.asMethodType().restype = type;
|
||||
} else if (sym.getKind() == ElementKind.PARAMETER) {
|
||||
} else if (sym.getKind() == ElementKind.PARAMETER && currentLambda == null) {
|
||||
sym.type = type;
|
||||
if (sym.getQualifiedName().equals(names._this)) {
|
||||
sym.owner.type.asMethodType().recvtype = type;
|
||||
|
@ -1117,11 +1117,11 @@ public class Annotate {
|
||||
|
||||
@Override
|
||||
public void visitNewClass(JCNewClass tree) {
|
||||
if (tree.def == null) {
|
||||
// For an anonymous class instantiation the class
|
||||
// will be visited separately.
|
||||
super.visitNewClass(tree);
|
||||
}
|
||||
scan(tree.encl);
|
||||
scan(tree.typeargs);
|
||||
scan(tree.clazz);
|
||||
scan(tree.args);
|
||||
// the anonymous class instantiation if any will be visited separately.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
* @test
|
||||
* @bug 8027262
|
||||
* @summary Stress test for type annotatons
|
||||
* @ignore 8057685 javac should not crash compiling type annotations
|
||||
* @compile AllLocations.java
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user