mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
new inference:
reject inference if lower and equals bounds do not agree; -> inference variable should fill extends list types with it's upper bounds as they are correctly substituted with session's inference variables, otherwise incorporation up-up rule could get refs to initial type parameter instead of correct inference variable
This commit is contained in:
+1
-1
@@ -3,5 +3,5 @@ import java.util.Map;
|
||||
class SOE {
|
||||
|
||||
public static <K extends M, M extends Map<K,M>> M foo() {return null;}
|
||||
public static <K1 extends M1, M1 extends Map<K1,M1>> Map<K1, M1> foo1() {<error descr="Incompatible types. Found: 'M', required: 'java.util.Map<K1,M1>'">return foo();</error>}
|
||||
public static <K1 extends M1, M1 extends Map<K1,M1>> Map<K1, M1> foo1() {return foo();}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user