Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3190,7 +3190,13 @@ private static boolean expressionsAreParallel(
if (column >= row.size()) {
continue;
}
nodeTypes.add(row.get(column).getKind());
// Treat UnaryTree expressions as their underlying type for the comparison (so, for example
// -ve and +ve numeric literals are considered the same).
if (row.get(column) instanceof UnaryTree) {
nodeTypes.add(((UnaryTree) row.get(column)).getExpression().getKind());
} else {
nodeTypes.add(row.get(column).getKind());
}
}
for (Multiset.Entry<Tree.Kind> nodeType : nodeTypes.entrySet()) {
if (nodeType.getCount() >= atLeastM) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class T {
private static final double[] f = {
95.0, 75.0, -95.0, 75.0,
-95.0, 75.0, +95.0, 75.0
};

private static final int[] g = {
x++, y, ++z,
x, y, ~z,
--x, ++y, z--
};

private static final bool[] h = {
a, b, c, d,
!e, a, b, c
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class T {
private static final double[] f = {
95.0, 75.0, -95.0, 75.0,
-95.0, 75.0, +95.0, 75.0
};

private static final int[] g = {
x++, y, ++z,
x, y, ~z,
--x, ++y, z--
};

private static final bool[] h = {
a, b, c, d,
!e, a, b, c
};
}