--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Tue Mar 22 13:14:12 2016 +0100
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Mon Apr 25 08:50:16 2016 -0700
@@ -100,10 +100,12 @@
// *** Internal support ***
/**
- * Internal: If this is from a compile, extract the compilation Unit.
+ * Internal: If this is from a compile/analyze wrapped in an outer class, extract the snippet.
* Otherwise null.
*/
- abstract Unit unitOrNull();
+ Snippet snippetOrNull() {
+ return null;
+ }
/**
* This is an unreachable-statement error
@@ -124,6 +126,7 @@
*/
boolean isResolutionError() {
//TODO: try javac RESOLVE_ERROR flag
- return getCode().startsWith("compiler.err.cant.resolve");
+ return getCode().startsWith("compiler.err.cant.resolve")
+ || getCode().equals("compiler.err.cant.apply.symbol");
}
}