Thu, 25 Jul 2013 14:51:40 +0100
8020843: javac crashes on accessibility check with method reference with typevar receiver
Summary: method reference overload check doesn't walk through type-variable receivers
Reviewed-by: jjg
mcimadamore@1920 | 1 | /* |
mcimadamore@1920 | 2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
mcimadamore@1920 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@1920 | 4 | * |
mcimadamore@1920 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@1920 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@1920 | 7 | * published by the Free Software Foundation. |
mcimadamore@1920 | 8 | * |
mcimadamore@1920 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@1920 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@1920 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@1920 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@1920 | 13 | * accompanied this code). |
mcimadamore@1920 | 14 | * |
mcimadamore@1920 | 15 | * You should have received a copy of the GNU General Public License version |
mcimadamore@1920 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@1920 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@1920 | 18 | * |
mcimadamore@1920 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
mcimadamore@1920 | 20 | * or visit www.oracle.com if you need additional information or have any |
mcimadamore@1920 | 21 | * questions. |
mcimadamore@1920 | 22 | */ |
mcimadamore@1920 | 23 | |
mcimadamore@1920 | 24 | /* |
mcimadamore@1920 | 25 | * @test |
mcimadamore@1920 | 26 | * @bug 8016081 |
mcimadamore@1920 | 27 | * @summary field initialized with lambda in annotation types doesn't compile |
mcimadamore@1920 | 28 | * @compile T8016081.java |
mcimadamore@1920 | 29 | */ |
mcimadamore@1920 | 30 | |
mcimadamore@1920 | 31 | class T8016081 { |
mcimadamore@1920 | 32 | interface fint { int get(); } |
mcimadamore@1920 | 33 | |
mcimadamore@1920 | 34 | @interface atype { |
mcimadamore@1920 | 35 | fint fld = ()->( fld == null ?0 : 1); |
mcimadamore@1920 | 36 | } |
mcimadamore@1920 | 37 | |
mcimadamore@1920 | 38 | @atype class T {} |
mcimadamore@1920 | 39 | } |