|
Java example source code file (T8019480.java)
The T8019480.java Java example source code
/*
* @test /nodynamiccopyright/
* @bug 8019480
* @summary Javac crashes when method is called on a type-variable receiver from lambda expression
* @author Maurizio Cimadamore
* @compile/fail/ref=T8019480.out -XDrawDiagnostics T8019480.java
*/
import java.util.*;
class T8019480<U> {
interface Predicate<T> {
void m(T t);
}
interface Stream<T> {
void forEach(Predicate<T> pt);
}
void test(U current, Stream<U> stream) {
List<U> list3 = new ArrayList<>();
stream.forEach(i -> list3.add(current.clone()));
}
}
Other Java examples (source code examples)Here is a short list of links related to this Java T8019480.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.