test/langtools/tools/javac/switchexpr/WarnWrongYieldTest.java
changeset 55561 4c0a7916d3cd
parent 55306 ea43db53de91
child 55573 e709712a8188
--- a/test/langtools/tools/javac/switchexpr/WarnWrongYieldTest.java	Fri May 24 04:18:18 2019 -0700
+++ b/test/langtools/tools/javac/switchexpr/WarnWrongYieldTest.java	Tue Jul 02 09:14:51 2019 +0200
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8223305
+ * @bug 8223305 8226522
  * @summary Verify correct warnings w.r.t. yield
  * @compile/ref=WarnWrongYieldTest.out -source 13 -XDrawDiagnostics -XDshould-stop.at=ATTR WarnWrongYieldTest.java
  */
@@ -159,4 +159,12 @@
         //OK - yield is a variable:
         yield[0] = 5;
     }
+
+    private void lambda() {
+        SAM s = (yield y) -> {};
+    }
+
+    interface SAM {
+        public void m(yield o);
+    }
 }