langtools/test/tools/javac/cast/7005095/T7005095neg.java
changeset 7627 de2a86da165e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/7005095/T7005095neg.java	Thu Dec 09 15:50:10 2010 +0000
@@ -0,0 +1,14 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7005095
+ * @summary Cast: compile reject sensible cast from final class to interface
+ * @compile/fail/ref=T7005095neg.out -XDrawDiagnostics T7005095neg.java
+ */
+
+class T7005095pos<T extends Integer> {
+    interface Foo<T> {}
+
+    static final class FooImpl implements Foo<String> {}
+
+    Object o = (Foo<T>) new FooImpl();
+}