mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inferred type check for raw constraints (IDEA-147529)
This commit is contained in:
+20
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -450,6 +450,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testRawInferredTypeCheck() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user