|
Java example source code file (TargetType45.java)
The TargetType45.java Java example source code/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * compiler crashes during flow analysis as it fails to report diagnostics during attribution * @compile TargetType45.java */ class TargetType45 { interface Predicate<X> { boolean apply(X x); } interface Mapper<X, Y> { Y apply(X x); } class Foo<X> { Foo<X> filter(Predicate p) { return null; } } static <U, V> Predicate compose(Predicate pi, Mapper m) { return null; } static Predicate<Integer> isOdd = i -> i % 2 != 0; void top10Counties(Foo<String> foos) { foos.filter(compose(isOdd, (String e) -> e.length())); } } Other Java examples (source code examples)Here is a short list of links related to this Java TargetType45.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 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.