langtools/test/tools/javac/lambda/8023558/T8023558a.java
changeset 20245 c351f524fbc6
parent 19939 ab90fbc7b74e
equal deleted inserted replaced
20244:d627dd086b41 20245:c351f524fbc6
    29 public class T8023558a {
    29 public class T8023558a {
    30     interface SAM<T> {
    30     interface SAM<T> {
    31         T get();
    31         T get();
    32     }
    32     }
    33 
    33 
       
    34     static class K<T> implements SAM<T> {
       
    35         public T get() {
       
    36             return (T)this;
       
    37         }
       
    38     }
       
    39 
    34     public static void main(String[] args) {
    40     public static void main(String[] args) {
    35         SAM<SAM> sam = new SAM<SAM>() { public SAM get() { return null; } };
    41         SAM<SAM> sam = new SAM<SAM>() { public SAM get() { return new K<>(); } };
    36         SAM temp = sam.get()::get;
    42         SAM temp = sam.get()::get;
    37     }
    43     }
    38 }
    44 }