|
Java example source code file (LambdaScope05.java)
The LambdaScope05.java Java example source code/* * @test /nodynamiccopyright/ * @bug 8015648 * @summary Duplicate variable in lambda causes javac crash * @compile/fail/ref=LambdaScope05.out -XDrawDiagnostics LambdaScope05.java */ class LambdaScope05 { interface VoidFun1 { void m(int i); } static Runnable r1 = () -> { VoidFun1 p = p -> { }; }; Runnable r2 = () -> { VoidFun1 p = p -> { }; }; static { Runnable r = () -> { VoidFun1 p = p -> { }; }; } { Runnable r = () -> { VoidFun1 p = p -> { }; }; } static void m_static() { Runnable r = () -> { VoidFun1 p = p -> { }; }; } void m() { Runnable r = () -> { VoidFun1 p = p -> { }; }; } } Other Java examples (source code examples)Here is a short list of links related to this Java LambdaScope05.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.