mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
var -> explicit type: fix for foreach parameter (IDEA-206640)
This commit is contained in:
+2
-3
@@ -87,11 +87,10 @@ public class VariableTypeCanBeExplicitInspection extends AbstractBaseJavaLocalIn
|
||||
PsiTypesUtil.replaceWithExplicitType(typeElement);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
PsiTypesUtil.replaceWithExplicitType((PsiTypeElement)element);
|
||||
}
|
||||
PsiTypesUtil.replaceWithExplicitType((PsiTypeElement)element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
final class Example {
|
||||
public static void main(String[] args) {
|
||||
for (String s : args) {
|
||||
System.out.println("s = " + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
final class Example {
|
||||
public static void main(String[] args) {
|
||||
for (v<caret>ar s : args) {
|
||||
System.out.println("s = " + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user