alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (T8020843b.java)

This example Java source code file (T8020843b.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

bifunction, function, object, string, t8020843b\:\:m, t8020843b\:\:m2

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

 

new blog posts

 

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.