author | ohair |
Tue, 25 May 2010 15:54:51 -0700 | |
changeset 5520 | 86e4b9a9da40 |
parent 812 | d60171f70ade |
permissions | -rw-r--r-- |
812
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
1 |
/* |
5520 | 2 |
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
812
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
4 |
* |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
8 |
* |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
13 |
* accompanied this code). |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
14 |
* |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
18 |
* |
5520 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
812
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
22 |
*/ |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
23 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
24 |
/* |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
25 |
* @test |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
26 |
* @bug 6294779 |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
27 |
* @summary Problem with interface inheritance and covariant return types |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
28 |
* @author Maurizio Cimadamore |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
29 |
* @compile T6294779a.java |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
30 |
*/ |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
31 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
32 |
public class T6294779a { |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
33 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
34 |
interface A { |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
35 |
A m(); |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
36 |
} |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
37 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
38 |
interface B extends A { |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
39 |
B m(); |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
40 |
} |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
41 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
42 |
interface C extends A { |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
43 |
C m(); |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
44 |
} |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
45 |
|
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
46 |
interface D extends B, C { |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
47 |
D m(); |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
48 |
} |
d60171f70ade
6294779: Problem with interface inheritance and covariant return types
mcimadamore
parents:
diff
changeset
|
49 |
} |