File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/jdk.jshell/share/classes/jdk/jshell
test/langtools/jdk/jshell Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ static enum TK {
190190 EOF (TokenKind .EOF , 0 ), //
191191 ERROR (TokenKind .ERROR , XERRO ), //
192192 IDENTIFIER (TokenKind .IDENTIFIER , XEXPR1 |XDECL1 |XTERM ), //
193- UNDERSCORE (TokenKind .UNDERSCORE , XDECL1 ), // _
193+ UNDERSCORE (TokenKind .UNDERSCORE , XDECL1 | XEXPR ), // _
194194 CLASS (TokenKind .CLASS , XEXPR |XDECL1 |XBRACESNEEDED ), // class decl (MAPPED: DOTCLASS)
195195 MONKEYS_AT (TokenKind .MONKEYS_AT , XEXPR |XDECL1 ), // @
196196 IMPORT (TokenKind .IMPORT , XDECL1 |XSTART ), // import -- consider declaration
Original file line number Diff line number Diff line change 2323
2424/*
2525 * @test
26- * @bug 8144903 8177466 8191842 8211694 8213725 8239536 8257236 8252409 8294431
26+ * @bug 8144903 8177466 8191842 8211694 8213725 8239536 8257236 8252409 8294431 8322532
2727 * @summary Tests for EvaluationState.variables
2828 * @library /tools/lib
2929 * @modules jdk.compiler/com.sun.tools.javac.api
@@ -621,4 +621,10 @@ public void varAnonymousClassAndStaticField() { //JDK-8294431
621621 assertEval ("var obj = new Object() { public static final String msg = \" hello\" ; };" );
622622 }
623623
624+ public void underscoreAsLambdaParameter () { //JDK-8322532
625+ assertAnalyze ("Func f = _ -> 0; int i;" ,
626+ "Func f = _ -> 0;" ,
627+ " int i;" , true );
628+ }
629+
624630}
You can’t perform that action at this time.
0 commit comments