equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 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 5073060 |
26 * @bug 5073060 8075610 |
27 * @summary Package private members not found for intersection types |
27 * @summary Package private members not found for intersection types |
28 * @author Bruce Eckel |
28 * @author Bruce Eckel |
29 * see http://www.artima.com/forums/flat.jsp?forum=106&thread=136204 |
29 * see http://www.artima.com/forums/flat.jsp?forum=106&thread=136204 |
30 * @compile GenericsAndPackages.java |
30 * @compile GenericsAndPackages.java |
31 */ |
31 */ |
32 |
32 |
33 package code; |
33 package code; |
34 |
34 |
35 interface HasColor { |
35 interface HasColor { |
36 java.awt.Color getColor(); |
36 String getColor(); |
37 } |
37 } |
38 |
38 |
39 class Dimension { |
39 class Dimension { |
40 int x, y, z; |
40 int x, y, z; |
41 } |
41 } |
42 |
42 |
43 class ColoredDimension<T extends Dimension & HasColor> { |
43 class ColoredDimension<T extends Dimension & HasColor> { |
44 T item; |
44 T item; |
45 ColoredDimension(T item) { this.item = item; } |
45 ColoredDimension(T item) { this.item = item; } |
46 T getItem() { return item; } |
46 T getItem() { return item; } |
47 java.awt.Color f() { return item.getColor(); } |
47 String f() { return item.getColor(); } |
48 int getX() { return item.x; } |
48 int getX() { return item.x; } |
49 } |
49 } |