CantAccessInnerClsConstr.java revision 2866:801b26483eb6
11592Srgrimes/* 21592Srgrimes * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. 31592Srgrimes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41592Srgrimes * 51592Srgrimes * This code is free software; you can redistribute it and/or modify it 61592Srgrimes * under the terms of the GNU General Public License version 2 only, as 71592Srgrimes * published by the Free Software Foundation. 81592Srgrimes * 91592Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT 101592Srgrimes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 111592Srgrimes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 121592Srgrimes * version 2 for more details (a copy is included in the LICENSE file that 131592Srgrimes * accompanied this code). 141592Srgrimes * 151592Srgrimes * You should have received a copy of the GNU General Public License version 161592Srgrimes * 2 along with this work; if not, write to the Free Software Foundation, 171592Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 181592Srgrimes * 191592Srgrimes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 201592Srgrimes * or visit www.oracle.com if you need additional information or have any 211592Srgrimes * questions. 221592Srgrimes */ 231592Srgrimes 241592Srgrimes// key: compiler.misc.cant.access.inner.cls.constr 251592Srgrimes// key: compiler.err.invalid.mref 261592Srgrimes 271592Srgrimesclass CantAccessInnerClsConstructor { 281592Srgrimes 291592Srgrimes interface SAM { 301592Srgrimes Outer m(); 311592Srgrimes } 321592Srgrimes 331592Srgrimes class Outer { } 3417478Smarkm 351592Srgrimes static void test() { 361592Srgrimes SAM s = Outer::new; 371592Srgrimes } 381592Srgrimes} 391592Srgrimes