-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression compiling Java in 0.5.0 #2979
Comments
@cushon, could you take a look? |
I think this is going to be fixed by https://bazel-review.googlesource.com/c/10990/ |
Verified: import java.util.*;
abstract class T {
abstract <E> ArrayList<E> newArrayList(Iterable<? extends E> elements);
abstract <E> ArrayList<E> newArrayList(Iterator<? extends E> elements);
abstract <E> LinkedHashSet<E> newLinkedHashSet(Iterable<? extends E> elements);
{
newArrayList(newLinkedHashSet(new ArrayList()));
}
} Before:
After:
|
Wait a minute, wait a minute. Bazel 0.5 is using an unreleased Java 9 compiler? While I'm glad that upgrading the compiler to another unreleased Java 9 compiler fixed this bug, this can't be the right thing. https://groups.google.com/d/msg/bazel-discuss/LUfkHkCYOoE/4-Y6ni9DBgAJ |
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
Fixes #2979 Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
This repository https://github.com/dfabulich/raw-list-bug builds without error in Bazel 0.4.5 when I run
bazel build example
, but fails to build in Bazel 0.5.0rc3build failure message
It seems like this must be a bug in the compiler; the code is using a raw LinkedHashSet, which is an Iterable, but it is not an Iterator.
The code compiles just fine with Oracle's javac compiler
javac 1.8.0_112
Environment info
Operating System:
macOS Sierra 10.12.4
Bazel version (output of
bazel info release
):release 0.5rc3
(it works withrelease 0.4.5
)I tried both the 0.5 version with an embedded JDK and without an embedded JDK, to see if that has an effect; it failed in both versions of Bazel 0.5 with identical error messages.
The text was updated successfully, but these errors were encountered: