mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
inferred type check for raw constraints (IDEA-147529)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.io.Serializable;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
class Test {
|
||||
|
||||
interface HasCode<T extends Serializable> {
|
||||
static <U extends Serializable, T extends Enum<T> & HasCode<U>> T fromCode(U code, Class<T> classEnum) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
enum EnumRaw implements HasCode {
|
||||
;
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
final BiConsumer<String, Class<EnumRaw>> code = HasCode::fromCode;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user