langtools/test/tools/javac/generics/diamond/pos/Pos05.java
changeset 29776 984a79b71cfe
parent 8635 383a416a2bdf
equal deleted inserted replaced
29775:dc7df633fea1 29776:984a79b71cfe
     1 /*
     1 /*
     2  * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 6939620 7020044
    26  * @bug 6939620 7020044 8062373
    27  *
    27  *
    28  * @summary  Check that 'complex' inference sometimes works in method context
    28  * @summary  Check that 'complex' inference sometimes works in method context
    29  * @author mcimadamore
    29  * @author mcimadamore
    30  * @compile Pos05.java
       
    31  *
    30  *
    32  */
    31  */
    33 
    32 
    34 public class Pos05 {
    33 public class Pos05 {
    35 
    34 
    39 
    38 
    40     void m(Foo<Integer> fi) {}
    39     void m(Foo<Integer> fi) {}
    41 
    40 
    42     void test() {
    41     void test() {
    43         m(new Foo<>(1));
    42         m(new Foo<>(1));
       
    43         m(new Foo<>(1) {});
    44     }
    44     }
       
    45 
       
    46     public static void main(String [] args) {
       
    47         new Pos05().test();
       
    48     }
       
    49 
    45 }
    50 }