mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
intersection in cast type: repeat interface, different parameterization checks
This commit is contained in:
+4
@@ -1,4 +1,5 @@
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
class FooBar1 {
|
||||
{
|
||||
@@ -7,5 +8,8 @@ class FooBar1 {
|
||||
Object y2 = (CharSequence & <error descr="Interface expected here">Integer</error>) x;
|
||||
Object y3 = (Integer & CharSequence) x;
|
||||
<error descr="Incompatible types. Found: 'java.lang.CharSequence & java.io.Serializable', required: 'int'">int y1 = (CharSequence & Serializable) x;</error>
|
||||
Object z0 = (Cloneable & <error descr="Unexpected type: class is expected">Runnable[]</error>) x;
|
||||
Object z1 = (Cloneable & <error descr="Repeated interface">Cloneable</error>) x;
|
||||
Object z2 = <error descr="java.util.Collection cannot be inherited with different arguments: String and Integer">(List<String> & Set<Integer>) x</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user