8201194: Handle local variable declarations in lambda deduplication

Reviewed-by: vromero
This commit is contained in:
Liam Miller-Cushon 2018-04-05 14:39:04 -07:00
parent f9e5a41e1a
commit 5acbe5ff92
5 changed files with 95 additions and 89 deletions

View file

@ -77,18 +77,45 @@ public class Deduplication {
group((Function<Integer, Integer>) y -> j);
group(
(Function<Integer, Integer>) y -> {
while (true) {
break;
}
return 42;
},
(Function<Integer, Integer>) y -> {
while (true) {
break;
}
return 42;
});
(Function<Integer, Integer>)
y -> {
while (true) {
break;
}
return 42;
},
(Function<Integer, Integer>)
y -> {
while (true) {
break;
}
return 42;
});
group(
(Function<Integer, Integer>)
x -> {
int y = x;
return y;
},
(Function<Integer, Integer>)
x -> {
int y = x;
return y;
});
group(
(Function<Integer, Integer>)
x -> {
int y = 0, z = x;
return y;
});
group(
(Function<Integer, Integer>)
x -> {
int y = 0, z = x;
return z;
});
class Local {
int i;