InnerInterface1.java revision 288:84061bd68019
1356843Sdim/*
2356843Sdim * Copyright 2001-2002 Sun Microsystems, Inc.  All Rights Reserved.
3356843Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4356843Sdim *
5356843Sdim * This code is free software; you can redistribute it and/or modify it
6356843Sdim * under the terms of the GNU General Public License version 2 only, as
7356843Sdim * published by the Free Software Foundation.
8356843Sdim *
9356843Sdim * This code is distributed in the hope that it will be useful, but WITHOUT
10356843Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11356843Sdim * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12356843Sdim * version 2 for more details (a copy is included in the LICENSE file that
13356843Sdim * accompanied this code).
14356843Sdim *
15356843Sdim * You should have received a copy of the GNU General Public License version
16356843Sdim * 2 along with this work; if not, write to the Free Software Foundation,
17356843Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18356843Sdim *
19356843Sdim * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20356843Sdim * CA 95054 USA or visit www.sun.com if you need additional information or
21356843Sdim * have any questions.
22356843Sdim */
23356843Sdim
24356843Sdim/*
25356843Sdim * @test
26356843Sdim * @bug 4452899
27356843Sdim * @summary Inner interfaces are not treated as static
28356843Sdim * @author gafter
29356843Sdim *
30356843Sdim * @compile  InnerInterface1.java
31356843Sdim */
32356843Sdim
33356843Sdimpackage test.tools.javac.generics.InnerInterface1;
34356843Sdim
35356843Sdiminterface Iterator<E> {
36356843Sdim}
37356843Sdim
38356843Sdimclass Set<E> {
39356843Sdim    Iterator<E> iterator() { return null; }
40356843Sdim}
41356843Sdim
42356843Sdiminterface Map<K,V> {
43356843Sdim    public interface Entry<K,V> {
44356843Sdim    }
45356843Sdim    public Set<Entry<K,V>> entrySet();
46356843Sdim}
47356843Sdim
48356843Sdimclass Hashtable<K,V> implements Map<K,V> {
49356843Sdim    public Set<Entry<K,V>> entrySet() { return null; }
50356843Sdim
51356843Sdim    public void foo() {
52356843Sdim        Iterator<Map.Entry<K,V>> it = entrySet().iterator();
53356843Sdim    }
54356843Sdim}
55356843Sdim