Thu, 23 Oct 2008 17:59:43 +0100
6711619: javac doesn't allow access to protected members in intersection types
Summary: Accordingly to new accessibility rules all members of intersection types (but private ones) should be accessible
Reviewed-by: jjg
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 4469737 |
duke@1 | 4 | * @summary Verify the source position for assertions. |
duke@1 | 5 | * @author gafter |
duke@1 | 6 | * |
duke@1 | 7 | * @compile -source 1.4 Position.java |
duke@1 | 8 | * @run main Position |
duke@1 | 9 | */ |
duke@1 | 10 | |
duke@1 | 11 | public class Position { |
duke@1 | 12 | static public void main(String[] args) { |
duke@1 | 13 | Position.class.getClassLoader().setClassAssertionStatus("U", true); |
duke@1 | 14 | new U().main(); |
duke@1 | 15 | } |
duke@1 | 16 | } |
duke@1 | 17 | class U { |
duke@1 | 18 | void main() { |
duke@1 | 19 | try { |
duke@1 | 20 | assert false; // line 20 |
duke@1 | 21 | } catch (Throwable t) { |
duke@1 | 22 | if (t.getStackTrace()[0].getLineNumber() == 20) { |
duke@1 | 23 | return; // passed |
duke@1 | 24 | } |
duke@1 | 25 | } |
duke@1 | 26 | throw new Error("failed 4469737"); |
duke@1 | 27 | } |
duke@1 | 28 | } |