mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8199327: nuke var type name after a lambda has been accepted
Reviewed-by: mcimadamore
This commit is contained in:
parent
254138139f
commit
c866d037bc
2 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8198512
|
||||
* @bug 8198512 8199327
|
||||
* @summary compiler support for local-variable syntax for lambda parameters
|
||||
* @compile/fail/ref=VarInImplicitLambdaNegTest01.out -XDrawDiagnostics VarInImplicitLambdaNegTest01.java
|
||||
*/
|
||||
|
@ -14,5 +14,8 @@ class VarInImplicitLambdaNegTest01 {
|
|||
IntBinaryOperator f4 = (int x, y) -> x + y; // error explicit and implicit
|
||||
|
||||
BiFunction<String[], String, String> f5 = (var s1[], var s2) -> s2; // error var and array
|
||||
|
||||
// correct use
|
||||
IntBinaryOperator f6 = (var x, var y) -> x + y; // ok
|
||||
BiFunction<Function<String, String>, String, String> f = (Function<String, String> s1, String s2) -> s2; // ok
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue