mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-96404 java type inference does not work in for-each template
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
public abstract class Zzza {
|
||||
|
||||
void foo(Object o) {
|
||||
if (o instanceof String) {
|
||||
for (java.lang.Object : o.substr<caret>) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public abstract class Zzza {
|
||||
|
||||
void foo(Object o) {
|
||||
if (o instanceof String) {
|
||||
for (java.lang.Object : ((String) o).substring(<caret>)) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1
@@ -890,6 +890,7 @@ public class ListUtils {
|
||||
}
|
||||
|
||||
public void testCastInstanceofedQualifier() throws Throwable { doTest(); }
|
||||
public void testCastInstanceofedQualifierInForeach() throws Throwable { doTest(); }
|
||||
public void testCastComplexInstanceofedQualifier() throws Throwable { doTest(); }
|
||||
|
||||
public void testCastTooComplexInstanceofedQualifier() throws Throwable { doAntiTest(); }
|
||||
|
||||
Reference in New Issue
Block a user