StreamApiMigration: fixed exception when void expression is used as method argument

This commit is contained in:
Tagir Valeev
2017-12-04 17:40:01 +07:00
parent b68f9d6aa6
commit 6746c6e1d1
3 changed files with 25 additions and 2 deletions
@@ -0,0 +1,11 @@
// "Replace with forEach" "true"
import java.util.stream.IntStream;
public class Test {
void foo(int i) {}
void test() {
IntStream.range(0, 10).forEach(i -> System.out.println(foo(i)));
}
}
@@ -0,0 +1,11 @@
// "Replace with forEach" "true"
public class Test {
void foo(int i) {}
void test() {
f<caret>or(int i=0; i<10; i++) {
System.out.println(foo(i));
}
}
}