mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8201194: Handle local variable declarations in lambda deduplication
Reviewed-by: vromero
This commit is contained in:
parent
f9e5a41e1a
commit
5acbe5ff92
5 changed files with 95 additions and 89 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue