7060926: Attr.PostAttrAnalyzer misses a case
Reviewed-by: mcimadamore
This commit is contained in:
parent
faf515b31f
commit
00fd0bdcfd
@ -3387,6 +3387,13 @@ public class Attr extends JCTree.Visitor {
|
||||
super.visitNewClass(that);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitAssignop(JCAssignOp that) {
|
||||
if (that.operator == null)
|
||||
that.operator = new OperatorSymbol(names.empty, syms.unknownType, -1, syms.noSymbol);
|
||||
super.visitAssignop(that);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitBinary(JCBinary that) {
|
||||
if (that.operator == null)
|
||||
|
19
langtools/test/tools/javac/failover/FailOver15.java
Normal file
19
langtools/test/tools/javac/failover/FailOver15.java
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6970584 7060926
|
||||
* @summary Attr.PostAttrAnalyzer misses a case
|
||||
*
|
||||
* @compile/fail/ref=FailOver15.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver15.java
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void m() {
|
||||
new UnknownClass<String, Void>() {
|
||||
public String getString() {
|
||||
String s = "";
|
||||
s += "more";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
langtools/test/tools/javac/failover/FailOver15.out
Normal file
4
langtools/test/tools/javac/failover/FailOver15.out
Normal file
@ -0,0 +1,4 @@
|
||||
FailOver15.java:17:10: compiler.err.expected: ';'
|
||||
FailOver15.java:11:13: compiler.err.cant.resolve.location: kindname.class, UnknownClass, , , (compiler.misc.location: kindname.class, Test, null)
|
||||
2 errors
|
||||
|
Loading…
Reference in New Issue
Block a user