|
Java example source code file (T8020843b.java)
The T8020843b.java Java example source code
/*
* @test /nodynamiccopyright/
* @bug 8020843
* @summary javac crashes on accessibility check with method reference with typevar receiver
* @compile/fail/ref=T8020843b.out -XDrawDiagnostics T8020843b.java
*/
class T8020843b {
interface Function<X, Y> {
Y m(X x);
}
interface BiFunction<X, Y, Z> {
Z m(X x, Y y);
}
Object m(int i) { return null; }
static Object m(String t) { return null; }
Object m2(int i) { return null; }
static Object m2(long t) { return null; }
static void test() {
Function<T8020843b, Object> f1 = T8020843b::m; //show bound case diag
BiFunction<T8020843b, String, Object> f2 = T8020843b::m2; //show unbound case diag
}
}
Other Java examples (source code examples)Here is a short list of links related to this Java T8020843b.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.