1 /*
 2  * @test /nodynamiccopyright/
 3  * @bug 8279655
 4  * @summary Bogus error: incompatible types: Object cannot be converted to Foo
 5  * @compile T8279655.java
 6  */
 7 
 8 public class T8279655 {
 9 
10     sealed interface Foo permits Bar { }
11     primitive class Bar implements Foo { }
12 
13     class Test {
14         void test(Object o) {
15             Foo foo = (Foo)o;
16         }
17     }
18 }