langtools/test/jdk/jshell/MethodsTest.java
changeset 35736 bae6ea327651
parent 33362 65ec6de1d6b4
child 37644 33cf53901cac
--- a/langtools/test/jdk/jshell/MethodsTest.java	Tue Feb 02 12:56:35 2016 +0000
+++ b/langtools/test/jdk/jshell/MethodsTest.java	Tue Feb 02 16:11:09 2016 -0800
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @bug 8080357
  * @summary Tests for EvaluationState.methods
  * @build KullaTesting TestingInputStream ExpectedDiagnostic
  * @run testng MethodsTest
@@ -36,7 +37,6 @@
 import org.testng.annotations.Test;
 
 import static jdk.jshell.Snippet.Status.*;
-import static jdk.jshell.Snippet.SubKind.*;
 
 @Test
 public class MethodsTest extends KullaTesting {
@@ -74,6 +74,15 @@
         assertMethodDeclSnippet(m1, "f", "(Bar)void", DROPPED, 1, 0);
     }
 
+    // 8080357
+    public void testNonReplUnresolved() {
+        // internal case
+        assertEval("class CCC {}", added(VALID));
+        assertEval("void f1() { CCC.xxxx(); }", added(RECOVERABLE_DEFINED));
+        // external case, not recoverable
+        assertDeclareFail("void f2() { System.xxxx(); }", "compiler.err.cant.resolve.location.args");
+    }
+
     public void methods() {
         assertEval("int x() { return 10; }");
         assertEval("String y() { return null; }");